Forwarding to the Wix  alias.

From: Jacques Eloff
Sent: Monday, January 05, 2009 2:41 PM
To: EE Dev Support
Subject: WiX & environment variables

Hi

I've just tried the msiqow alias (which failed) and I can't find a general WiX 
alias, so hoping someone here might be able to help

I need to create a file in the %TEMP% folder of the user running the MSI. What 
I've been doing is creating a property to hold the full path using a custom 
action (since $(env.temp) is resolved by the preprocessor at compile time of 
the MSI).

<CustomAction Id='$(var.VSVer)_VSLogFile' Property='VS_LOG_FILE' 
Value='[%temp]\Foo.txt/>
<CustomAction Id='$(var.VSVer)_VSCreate_LogFile' Property='VSCreate_LogFile' 
Value='"cmd.exe" /c copy /Y NUL [VS_LOG_FILE]'/>

The problem that I'm having is that when using msiexec and changing %TEMP% 
locally, then the MSI still picks up the original value. For example, if I have 
a cmd file such as

setlocal
set TEMP=C:\
msiexec /I MySetup.msi /q /l*v .\install.log
endlocal

and %TEMP% points to C:\users\timmy\AppData\Local\Temp then running the cmd 
script does not result in the MSI creating Foo.txt under C:\ as I would expect. 
Is there away to work around this and pick up the current value of %TEMP% at 
install time?

I've also tried using the [TempFolder] property and get the same result.

Jacques


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to