This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Getting two contradictory values for the property "FOLDER_TEMP"
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Dec 05, 2013
08:04 AM
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"
WriteLine(nvFileHandle,svMessage);
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.
-Amit
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"
WriteLine(nvFileHandle,svMessage);
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.
-Amit
(1) Reply
Dec 05, 2013
09:04 AM
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.