Hmm, have you checked the verbose log on this? I wouldn't expect these variables to exist if this is happening after the MSI elevates (as that process is running as system). You need to gather the attributes in user mode and pass them to the elevated process via a property.
>From several examples I have seen (Ex: >http://stackoverflow.com/questions/3459998/get-an-environment-variable-into-a-wix-property), > the syntax is correct [%ENVVARNAME] for getting environment variables at >runtime. Also, can you attempt this without the <?define ... as a test case? (Or you could just use Orca or InstEdit to view the output after a build.) Your previous comment was confusing as you weren't using the define in the SetProperty custom action, but you were still referring to it. -----Original Message----- From: StevenOgilvie [mailto:[email protected]] Sent: Friday, September 21, 2012 10:37 AM To: [email protected] Subject: Re: [WiX-users] -----SPAM----- variables not working... Sigh, now I am getting nothing... I have tried: <SetProperty Id="DATABASE_USERNAME" Value="[%USERDOMAIN]\[%USERNAME]" Before="InstallInitialize" Sequence="execute" /> where LogonDomainName is: <?define LogonDomainName = "[%USERDOMAIN]"?> how hard can it be to get a system variable at runtime? Steve -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/variables-not-working-tp7580709p7580744.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ WiX-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wix-users

