I have been noticed $TEMP param has different value when you:
- run the installer.exe manually (by double clicking)
- run from Application with Admin rights.
Running manually will result $TEMP = C:/Users/username/AppData/Local/Temp
Running from App with Admin rights = C:/Windows/Temp
CONDITION:
I have an installer that requires system reboot to finish the process.
To achieve that, I make a copy of installer in the $TEMP, and put the path in RunOnce
PROBLEM:
The function works fine (after reboot, the program is updated with new version).
However, at the end of installation process, I am unable to delete the copy of installer because the $TEMP = C:/Users/username/AppData/Local/Temp when running the installer by RunOnce.
In fact, the copy of installer is located in C:/Windows/Temp
QUESTION:
Is it possible to force the $TEMP to always be = C:/Windows/Temp ?
Is there any better solution to workaround the case of installation with system reboot?