Usage of environment variables in PhotoFiltre.ini

You think you have found a bug ? You've got a suggestion to modify PhotoFiltre ? /
Ĉu vi opinias vi trovis malbonadĵon ? Ĉu vi havas sugeston por modifi PhotoFiltre ?

Modérateur : Modérateurs

pitter75
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 2
Inscription : 16 avr. 2010 8:20
Version de PhotoFiltre : 6.4.0
Système d'exploitation : Windows XP
Processeur : Intel Core2
Mémoire RAM : 2GB

Usage of environment variables in PhotoFiltre.ini

Message par pitter75 »

Hello,

i'd like to store photofiltre settings in a default user profile that will be used for new created users on a Windows XP machine. This users should have set the default open and save path to their documents path "D:\Documents\%USERNAME%".

My entry in PhotoFiltre.ini looks like this:
[Params]
Open=D:\Documents\%USERNAME%

But this doesn't work. Because PhotoFiltre doesn't find this path, it uses its program folder for open and save dialog.
I use this method in ini files and/or registry settings for many programs and most time it works. Is there a special format or a workaround for PhotoFiltre?
Antonio
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 12856
Inscription : 28 oct. 2003 22:49

Re: Usage of environment variables in PhotoFiltre.ini

Message par Antonio »

photofiltre need exact path name, no dynamic :cry:
pitter75
Nouveau(elle)|Nouveau|Nouvelle
Nouveau(elle)|Nouveau|Nouvelle
Messages : 2
Inscription : 16 avr. 2010 8:20
Version de PhotoFiltre : 6.4.0
Système d'exploitation : Windows XP
Processeur : Intel Core2
Mémoire RAM : 2GB

Re: Usage of environment variables in PhotoFiltre.ini

Message par pitter75 »

ok, then i found a workaround for solution. i post it here if somebody else has the same problem:

remove this lines from <default user profile>\<appdata>\PhotoFiltre\PhotoFiltre.ini:

Code : Tout sélectionner

[Params]
Open=...
Save=
create a batch file and place it into <default user profile>\<start menu>\<Programs>\<Autostart>

Code : Tout sélectionner

@echo off
set INIFILE="%APPDATA%\PhotoFiltre\PhotoFiltre.ini"
set INIFILENEW="%APPDATA%\PhotoFiltre\PhotoFiltre-new.ini"
echo [Params] > %INIFILENEW%
echo Open="D:\Documents\%USERNAME%" >> %INIFILENEW%
echo Save= >> %INIFILENEW%
type %INIFILE% >> %INIFILENEW%
move /y %INIFILENEW% %INIFILE%
del /f %0
the batch file will run on first login of the new user and deletes itself afterwards. it will place the customized lines into a new ini, paste the old ini after that and replace the old ini with the new.
Antonio
Administrateur(trice)|Administrateur|Administratrice
Administrateur(trice)|Administrateur|Administratrice
Messages : 12856
Inscription : 28 oct. 2003 22:49

Re: Usage of environment variables in PhotoFiltre.ini

Message par Antonio »

yes nice :wink: