Ok, so I'm trying to set the enviroment variable in NSIS for a program, and this one is from John's aMSN launcher for the UserProfile path. I tried this, and the programs settings are created in the Data folder under "Data\settings\Application Data\AppName"
However, when I try to change the "USERPROFILE" variable to the "APPDATA" variable, which I'm quite sure is also a Windows variable, it won't work? I noticed in say the command prompt launcher, the below is exactly the same, just with the "ComSpec" variable, so I don't understand why the "APPDATA" variable is not working? Can anyone help me out?
UserProfileEnvironment:
;=== Set the %USERPROFILE% directory if we have a path
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("USERPROFILE", "$SETTINGSDIRECTORY").r0'
THIS Won't work...
UserProfileEnvironment:
;=== Set the %USERPROFILE% directory if we have a path
System::Call 'Kernel32::SetEnvironmentVariableA(t, t) i("APPDATA", "$SETTINGSDIRECTORY").r0'
The section title doesn't matter because it's just a reference for the launcher to go to, and the ;=== is ignored, so I don't understand what's wrong?
Does anyone else?
APPDATA is hit or miss. Some apps use it, some don't. Even USERPROFILE can be hit or miss. Some apps use it, some pull it from the registry (Sudoku did that before I modified it).
Sometimes, the impossible can become possible, if you're awesome!
Well that's good to know, saves me more hours of trying to figure it out.
What do you think is better, having "Data\settings\Application Data\ultraMaGe"
Or just copying the settings back and forth? ultraMaGe is just a fairly decent file manager on SF that I wanted to post in beta for the people who want a portable file manager. Thought, I was gonna try and recompile it with nicer icons, so I'll check into that as well.
______________________
Signature...What Signature?
Yoink! *steals ultraMaGe Portable* Mine now! (Kidding :P)
And you should probably just copy/rename. It's guaranteed to work (as long as the program isn't stupid).
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.
"If you're not part of the solution, you're part of the precipitate."
Yea, that's what I was thinking. Haha, the only reason I'm going it is because you mentioned it in a past thread.
______________________
Signature...What Signature?
John.
I have something in the pipeline which needs the temp variable to be set to the drive so it doesnt fill up the users temp folder and I am thankful for the clarification as I played with the environment variables stuff in NSIS for some time now.
“I can live with doubt and uncertainty and not knowing. I think it is much more interesting to live not knowing than to have answers that might be wrong.” - Richard P. Feynman
"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate