Environment variables with ScummVM
Moderator: ScummVM Team
Environment variables with ScummVM
Hello!
I made a little batch file with this commands:
if not exist "%AppData%\ScummVM" md "%AppData%\ScummVM"
if not exist "%AppData%\ScummVM\scummvm.ini" copy scummvm.ini "%AppData%\ScummVM\"
if not exist "%AppData%\ScummVM\ScummVM_Saves" md "%AppData%\ScummVM\ScummVM_Saves"
set sizeSRC=%~z1
for %%R in ("%AppData%\ScummVM\scummvm.ini") do if %%~zR equ 0 copy scummvm.ini "%AppData%\ScummVM\"
cmd /c start scummvm.exe --config=scummvm.ini
My problem is I'ld like to specify the savepath using the %AppData% variable so ScummVM may work in every operating system (I hope).
I tried to add the argument --savepath="%AppData%\ScummVM\ScummVM_Saves" but the program doesn't translates the value of variable, there are a solution?
Very thanks
I made a little batch file with this commands:
if not exist "%AppData%\ScummVM" md "%AppData%\ScummVM"
if not exist "%AppData%\ScummVM\scummvm.ini" copy scummvm.ini "%AppData%\ScummVM\"
if not exist "%AppData%\ScummVM\ScummVM_Saves" md "%AppData%\ScummVM\ScummVM_Saves"
set sizeSRC=%~z1
for %%R in ("%AppData%\ScummVM\scummvm.ini") do if %%~zR equ 0 copy scummvm.ini "%AppData%\ScummVM\"
cmd /c start scummvm.exe --config=scummvm.ini
My problem is I'ld like to specify the savepath using the %AppData% variable so ScummVM may work in every operating system (I hope).
I tried to add the argument --savepath="%AppData%\ScummVM\ScummVM_Saves" but the program doesn't translates the value of variable, there are a solution?
Very thanks
- LogicDeLuxe
- Posts: 437
- Joined: Thu Nov 10, 2005 9:54 pm
Re: Environment variables with ScummVM
I'm pretty sure that this can work in Windows (2000, XP and later) only. That is far from "every operating system".giovpres wrote:My problem is I'ld like to specify the savepath using the %AppData% variable so ScummVM may work in every operating system (I hope).
If I am not mistaken it is the OS the interprets that, not ScummVM. This would mean you have some non-ScummVM related problem.giovpres wrote: I know, but the problem is I can't use any variable... ScummVM doesn't interpretes them...
Anyway..... Why not go the oldskool way and just use the C:\Scummvm directory for everything?
Vista allows users by default to make new dirs in C: and Win7 probably too. This won't work on business computers that have the user profile stored remotely but the upside is that you gain Win9x compatibility
Thanks bobdavis, if u are sure all OS permits to write to C: root I'll put saves folders there so I resolve my problem, I've winXP so I can't test how Vista or Seven works, but if u tell so I belive ubobdevis wrote:If I am not mistaken it is the OS the interprets that, not ScummVM. This would mean you have some non-ScummVM related problem.giovpres wrote: I know, but the problem is I can't use any variable... ScummVM doesn't interpretes them...
Anyway..... Why not go the oldskool way and just use the C:\Scummvm directory for everything?
Vista allows users by default to make new dirs in C: and Win7 probably too. This won't work on business computers that have the user profile stored remotely but the upside is that you gain Win9x compatibility
Still thanks
Yeah. I think the general idea is that right management is by default only enforced for dirs that Windows itself made and manages.
You might get in trouble with using C:\ScummVM if more then one user on the same machine tries to run ScummVM.
I get to sit behind a real live Vista computer with UAC on before Monday, so I can test it
You might get in trouble with using C:\ScummVM if more then one user on the same machine tries to run ScummVM.
I get to sit behind a real live Vista computer with UAC on before Monday, so I can test it
Ok, I doing this because I'ld like to use ScummVM from dvd, avoiding to copy all files on hard disk, so I may run it on every pc without errors of permissions.bobdevis wrote:Yeah. I think the general idea is that right management is by default only enforced for dirs that Windows itself made and manages.
You might get in trouble with using C:\ScummVM if more then one user on the same machine tries to run ScummVM.
I get to sit behind a real live Vista computer with UAC on before Monday, so I can test it
A standard user account on Vista/Win7 with UAC does allow the creation of new base folders on the C: drive. As mentioned, it is the system folders that are protected. If you are unable to do so on a given machine, it must be a locked down machine, like what you would find in a work environment. If you don't have access to the Policy Editor to reset security policies to defaults, you can create a subfolder in your user folder.
-
- Posts: 129
- Joined: Mon May 05, 2008 3:37 pm