PDA

View Full Version : How to create log file in MSI basic project



Eyal Goren
06-15-2005, 02:23 AM
Hi,

We have an installation project of type MSI basic project, and it contains a log file defined in the build->setting->MSI log file.

The only problem is that we need to give it absolute path, so we specify it as: C:\<Application name>_Installation.log.

We would like to know how to create log file that will be generated under:

<WINDRIVE>:\Documents and Settings\<user name>

Does any one knows how to do it ???

Eyal

MartinMarkevics
06-15-2005, 12:08 PM
I believe you can use enviroment variables. Something like "%TMP%\<YourLogFileName>.log". Of course this assumes this environment variable is always defined on the users machine. Probably a pretty safe assumption though. That would put it in the Temp folder for the given user, but may work for you.

SGorman
06-17-2005, 08:25 AM
Why not use the AppDataFolder property or the TempFolder property.
There is a whole slew of System Folder properties that the Windows Installer sets values for.

RobertDickau
06-17-2005, 08:37 AM
Normally yes, but a log file has to be initiated before the installer runs, and so properties won't be available yet. Using %TEMP% or %USERPROFILE% is probably required in this case.

Eyal Goren
06-28-2005, 02:40 AM
Hi,

We tried to use the %USERPROFILE% and we recieve error that the directory has to be existing.

Perhaps we don't define it correctly, we define it in the:

From the Build->Setting

We put the following lines:

MSIEXEC command line arguments: /Liwrmolv+ucape "%USERPROFILE%\RPI.log"

Log file: "%USERPROFILE%\RPI.log"

Is that correct ?

Eyal