Re: [WiX-users] -----SPAM----- variables not working...
You seem to be mixing up pre-processor instructions and runtime, are you trying to get the user domain and logon when you run the msi? If so you can use [LogonUser] in your property (I am not sure if that includes the domain though). Neil Hi all, I have these two set: ?define LogonUserName = [%USERNAME]? ?define LogonDomainName = [%USERDOMAIN]? Then this property: Property Id=DATABASE_USERNAME Secure=yes Value=$(var.LogonDomainName)\$(var.LogonUserName) / but when I use it at runtime I see this: [%USERDOMAIN]\[%USERNAME] thanks, Steve -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/variables-no t-working-tp7580709.html Sent from the wix-users mailing list archive at Nabble.com. -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://ad.doubleclick.net/clk;258768047;13503038;j? http://info.appdynamics.com/FreeJavaPerformanceDownload.html ___ WiX-users mailing list WiX-users@lists.sourceforge.net 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 WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
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 WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] -----SPAM----- variables not working...
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:sogil...@msn.com] Sent: Friday, September 21, 2012 10:37 AM To: wix-users@lists.sourceforge.net 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 WiX-users@lists.sourceforge.net 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 WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users