PDA

View Full Version : Finding windows USERPROFILE Temp directory



ekiller200
05-04-2004, 02:19 PM
During an Uninstall, I am trying to remove some files that our app places in the "TEMP" directory that is a path in the windows environment. More specific "%USERPROFILE%\Local Settings\TEMP"

As far as I can tell IS script has no means of retrieving this dynamic path.. Although I know it uses it internally for SUPPORTDIR..

I guess I can write some script to parse out the all of the GUID info from SUPPORTDIR, but there has to be a better faster way to do this..

totophe54
05-04-2004, 02:51 PM
If you use an InstallScript MSI project, you can use :

nvProperty=300;
MsiGetProperty(hMSI,"TempFolder",svProperty,nvProperty);

svProperty contains full path to the temp path of the currently logged user.

ekiller200
05-05-2004, 09:50 AM
This is not a MSI install script project
if it was I would use [USERPROFILE]