Archive: Temp variable - which temp?


Temp variable - which temp?
Hello,

I'm trying to set up an installer that can detect the presence of another program by checking in the Temp directory for the existence of a directory.

The problem I'm having is the Temp directory the other program uses is (on my machine):
C:\WINNT\Temp

However, when I run the installer and dump some output, NSIS's $TEMP variable is:
C:\DOCUME~1\rob\LOCALS~1\Temp

Is there a way to have NSIS use the Windows Temp directory instead of the one for my user?

Thanks,
Rob


$WINDIR\Temp

-Stu


That's easy! Thanks.


C:\WINNT\Temp is definately not the default Windows temporary folder. It's probably only there for backwards compatibility.


Actually on NT-based systems there are TWO temporary directories: user ("%USERPROFILE%\Local Settings\Temp" by default) and system ("%SYSTEMROOT%\Temp" by default). The last one intended for programs running under the system account.
Check your "System Properties"->"Advanced"->"Environment Variables".


That's right. But it looks like this appliation does not use the correct detection method.