My question is this, i am making an app portable that leaves its appdata in the
C:\Documents and Settings\****\local settings\application data folder, now when i try to get this to save in my data folder it always puts it in the C:\ instead of where i want it to go. What would i change in this part of my script:
!if "${REDIRECTUSERPROFILE}" = "TRUE" IfFileExists "$DATADIR\UserProfile\*.*" +2 CreateDirectory "$DATADIR\UserProfile" ; create directory for portable user profile System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("USERPROFILE", "$DATADIR\UserProfile").r0' ; set new user profile folder StrCmp "$0" "0" ProfileError Goto ProfileDone ProfileError: MessageBox MB_ICONEXCLAMATION|MB_OK "Can't set environment variable for new Userprofile!$\nLauncher will be terminated." Abort ProfileDone: !endif
Oh yeah the environment variable for local settings is this i think "%userprofile%\local settings\application data" is there another one? and how would i add this to my script to get it to save in my "data" folder?
[Fixed your post up - Ryan]
What's the full path of where your files end up? In the root of C:\ or some subfolder?
it ends up in a folder in the C:\Ares, instead of it being put in my "data\ares" folder.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
Not sure. It sounds like it's checking for the existence of %userprofile%\Application Data\ or %userprofile%\Local Settings\Application Data\, and if it doesn't exist it's defaulting to C:\Ares.
Try creating $DATADIR\UserProfile\Application Data\ or $DATADIR\UserProfile\Local Settings\Application Data\
ill try those in a bit and tell u if they work.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)
I dont know but everything i try doesnt work. Im gonna check my script and make sure i didnt make an error or something.
An eye for an eye makes the whole world blind.
Mahatma Gandhi,
Indian political and spiritual leader (1869 - 1948)