Jump to content

My Documents and %UserProfile% problems


arablizzard2413

Recommended Posts

ARG! This is so frustrating!

At first with just the %UserProfile% the game would save into the All Users Sharded Documents, so I added the %AllUsersProfile% to change that, but now it just saves on the root of that drive (F:\; a folder named 'EA Games' is created, just as if it were saved in the original My Documents) instead of inside the "mydoc" folder... The game is The Sims 2.

Run.bat:

----------

SET USERPROFILE=f:\mydoc

SET ALLUSERSPROFILE=f:\mydoc

Sims2SP1.exe

Edited by arablizzard2413
Link to comment
Share on other sites


SET *=<dir> only works in a batch file, for the duration of that batch file.

REG ADD "HKLM\System\CurrentControlSet\Control\Session Manager\Enviroment" /v "UserProfile" /d "F:\MyDoc"
REG ADD "HKLM\System\CurrentControlSet\Control\Session Manager\Enviroment" /v "AllUsersProfile" /d "F:\MyDoc"

Tis is more permanent. ;)

Link to comment
Share on other sites

SET *=<dir> only works in a batch file, for the duration of that batch file.

REG ADD "HKLM\System\CurrentControlSet\Control\Session Manager\Enviroment" /v "UserProfile" /d "F:\MyDoc"
REG ADD "HKLM\System\CurrentControlSet\Control\Session Manager\Enviroment" /v "AllUsersProfile" /d "F:\MyDoc"

Tis is more permanent. ;)

I doubt that works ... UserProfile & AllUsersProfile don't set by default in your regkey path ...

Link to comment
Share on other sites

Stupid suggestion : do not try to fool the game. Instead, move its files elsewhere after playing it, and move its files back before playing it.

Run.bat :

----------

@ECHO OFF

MOVE /Y "F:\Where you want the files to be\*.*" "C:\Where the game save its files by default\*.*"

START /WAIT "C:\Where the game is\Sims2SP1.exe"

MOVE /Y "C:\Where the game save its files by default\*.*" "F:\Where you want the files to be\*.*"

It will be fully transparent both for you and for the game.

Note: the MOVE command can move only files, not folders. If there is folders, you need to use XCOPY + DEL + RD

++

Link to comment
Share on other sites

I get what you mean, you only want Sims to install to that path for it's savegames but you don't want that to be your permanent My Documents.

First, EA uses %UserProfile%\My Doucmnets and secondly, it always checks %UserProfile%\My Documents instead of where the savegame was actually installed to. The batch only uses set*=* in the batch itself, not any programs launched by it.

Try Delprat's method.

Edited by T D
Link to comment
Share on other sites

The batch only uses set*=* in the batch itself, not any programs launched by it.
Environments are passed between parent and child processes, so if you open a command prompt and launch a process it will inherit the environment.

What you could do is use FileMon to see what paths are being probed by the game - maybe it's not only checking the path but ownership also, or something like that.

Perhaps it is indeed looking for "%UserProfile%\My Documents", and you don't have a "My Documents" folder under "f:\mydoc"?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...