Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

Getting two contradictory values for the property "FOLDER_TEMP"

Hi All,

I have installed my application on windows 2008 and i set the installation log to "/l*v %temp%\Install.log". In the same log file i append some more installation information by using the below custom action and append was successful

//Put the message box to see the value temp value
MessageBox(FOLDER_TEMP,INFORMATION); // value is "C:\Users\ADMINI~1\AppData\Local\Temp\2"

But when i want to append the uninstallation information in the same log by using the same custom action at the time of uninstallation,it failed to append.
Because the FOLDER_TEMP value i am getting at the time of uninstallation is "C:\Users\ADMINI~1\AppData\Local\Temp" but my current log file location is "C:\Users\ADMINI~1\AppData\Local\Temp\2\install.log"

Anybody please suggest me the way to resolve this issue where i can append my log information at the time of installation and uninstallation.

Labels (1)
0 Kudos
1 Reply
Level 12 Flexeran
Level 12 Flexeran

I would not recommend accessing the log file directly. If at all possible you should use MsiProcessMessage with INSTALLMESSAGE_INFO to write to the log. If you cannot do that for various reasons (such as being in a custom action off a ControlEvent), you could use property change logging, or require a recent enough version of MSI to support the MsiLogFileLocation property. While this is back to accessing the file directly, if you use that, you don't have to worry about the file's name or location being other than what you expect.
0 Kudos