Changing Windows public folder in batch script.
- by Angus
I've installed Steam on an external hard drive so I can play games on different computers by just moving the drive around. Since save games are often saved in My Documents or AppData, but I want them to move with the external hard drive, I wrote a batch file that sets environment variables before starting steam.
setocal
set USERPROFILE=%EXTERNAL_LETTER%\Profile\Me
set APPDATA=%USERPROFILE%\AppData\Roaming
...
start %TARGETAPP%
endlocal
I'm not sure if this is the right way to do this on Windows, but it seems to work.
However, one game saves its games in the Shared Documents folder. I've tried setting %PUBLIC% and %ALLUSERSPROFILE% but that does not seem to affect where the game looks. Is it possible to make this one program use a different Shared Documents folder, either by environment variables or some other means?
The change in Shared Documents should only affect the one program, I do not want it to be a permanent or system wide change to Windows.