Neil Sleightholm wrote > I don't think reading the environment variables will work as the MSI is in > the context of the msiexec service not the user that is logged on. > > -----Original Message----- > From: StevenOgilvie [mailto:
> sogilvie@ > ] > Sent: 21 September 2012 16:37 > To: > wix-users@.sourceforge > Subject: -----SPAM----- Re: [WiX-users] -----SPAM----- variables not > working... > > Sigh, now I am getting nothing... I tried this to verify it this morning and the install log shows that the type 51 created by "SetProperty" fired off: MSI (s) (0C:60) [10:36:29:726]: Doing action: SetDATABASE_USERNAME Action 10:36:29: SetDATABASE_USERNAME. Action start 10:36:29: SetDATABASE_USERNAME. MSI (s) (0C:60) [10:36:29:726]: PROPERTY CHANGE: Adding DATABASE_USERNAME property. Its value is '32BitWin7\test_user'. Action ended 10:36:29: SetDATABASE_USERNAME. Return value 1. MSI (s) (0C:60) [10:36:29:726]: Doing action: InstallInitialize and the property is found at the end of the install when the properties are dumped: Property(S): DATABASE_USERNAME = 32BitWin7\test_user So you should see those sort of entries in your install log. I didn't use any defines at all. I just added the SetProperty element under <Product> so that it was included in the install: <SetProperty Id="DATABASE_USERNAME" Value="[%USERDOMAIN]\[%USERNAME]" Before="InstallInitialize" Sequence="execute" /> In Orca, the CA's row in the CustomAction table looks like this: SetDATABASE_USERNAME 51 DATABASE_USERNAME [%USERDOMAIN]\[%USERNAME] A "set" command shows that the values match that of the user and domain. USERDOMAIN=32BitWin7 USERNAME=test_user It worked with both a local account and a domain account. Does the install log show the CA firing off? Is the CA visible in the CustomAction table using Orca? -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/variables-not-working-tp7580709p7580761.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 WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users