Re: [WiX-users] Installer runs OK via msiexec but fails when double-clicked
I didn't have the InstallPrivileges=elevated in the package section. I've added it but no change. -Original Message- From: Jeremiahf [mailto:jeremi...@gmail.com] Sent: 29 April 2014 00:31 To: General discussion about the WiX toolset. Subject: Re: [WiX-users] Installer runs OK via msiexec but fails when double-clicked Hello, I know you said the installer prompts for elevated but do you have this? InstallPrivileges=elevated InstallScope=perMachine/ In the package ID section in your product.wxs file. On Mon, Apr 28, 2014 at 5:46 PM, b.ras...@leonit.nl wrote: Dit mailadres is niet meer in gebruik. Mail kan je voortaan sturen naar basti...@careercontrol.nl. - - Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- They may forget what you said but they will never forget how you made them feel. -- Anonymous --- --- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
[WiX-users] Installer runs OK via msiexec but fails when double-clicked
I have an installer that invokes InstallUtilLib.dll via a set of CAs as documented in http://blogs.msdn.com/b/josealmeida/archive/2004/11/08/253831.aspx http://avinashkt.blogspot.co.uk/2007/05/how-to-create-installer-using-wix-which.html If I simply double-click on the MSI or run it using msiexec (NOT as an administrator) then it fails with Error 2869! The relevant files from the logfile (msiexec /Log ...) are Action 17:17:50: Install. DEBUG: Error 2869: The dialog ErrorDlg has the error style bit set, but is not an error dialog The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869. The arguments are: ErrorDlg, , MSI (c) (44:C0) [17:17:52:800]: Product: OpenPKI Tools -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869. The arguments are: ErrorDlg, , Error 1001. MSI (s) (04!EC) [17:17:52:800]: DEBUG: Error 2769: Custom Action Install did not close 1 MSIHANDLEs. The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: Install, 1, CustomAction Install returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) Action ended 17:17:52: InstallFinalize. Return value 3. Action 17:17:52: Rollback. Rolling back action: If I run the installer via msiexec AS AN ADMINISTRATOR it works fine! For reference - the set of CAs, including the custom action Install to which the Error 2769 refers is as follows: - InstallExecuteSequence Custom Action=InstallSetProp After=StartServices$WmiProvidergt;2/Custom Custom Action=Install After=InstallSetProp$WmiProvidergt;2/Custom Custom Action=UninstallSetProp After=MsiUnpublishAssemblies$WmiProvider=2/Custom Custom Action=Uninstall After=UninstallSetProp$WmiProvider=2/Custom Custom Action=CommitSetProp After=Rollback$WmiProvidergt;2/Custom Custom Action=Commit After=CommitSetProp$WmiProvidergt;2/Custom Custom Action=RollbackSetProp After=Install$WmiProvidergt;2/Custom Custom Action=Rollback After=RollbackSetProp$WmiProvidergt;2/Custom /InstallExecuteSequence CustomAction Id=Uninstall BinaryKey=InstallUtil DllEntry=ManagedInstall Execute=deferred / CustomAction Id=UninstallSetProp Property=Uninstall Value=' /installtype=notransaction /action=uninstall /Logfile= [#WmiProviderDLL] [#WmiProviderDLLConfig]' / CustomAction Id=Install BinaryKey=InstallUtil DllEntry=ManagedInstall Execute=deferred / CustomAction Id=InstallSetProp Property=Install Value=' /installtype=notransaction /action=install /Logfile= [#WmiProviderDLL] [#WmiProviderDLLConfig]' / CustomAction Id=Rollback BinaryKey=InstallUtil DllEntry=ManagedInstall Execute=rollback / CustomAction Id=RollbackSetProp Property=Rollback Value=' /installtype=notransaction /action=rollback /Logfile= [#WmiProviderDLL] [#WmiProviderDLLConfig]' / CustomAction Id=Commit BinaryKey=InstallUtil DllEntry=ManagedInstall Execute=commit / CustomAction Id=CommitSetProp Property=Commit Value=' /installtype=notransaction /action=commit /Logfile= [#WmiProviderDLL] [#WmiProviderDLLConfig]' / Am I missing something that should be obvious? It feels as if the CAs are not being run with admin rights (even though I am prompted). All suggestions gratefully received. Apologies in advance if this is a FAQ with a well known answer that I've missed! Regards David -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users
Re: [WiX-users] Installer runs OK via msiexec but fails when double-clicked
Phil, Many thanks for the comments. To answer your questions ... So far as I recall, there were no other errors recorded in the log file - I'll check again in the morning. So far as I know, the error dialog is standard WiX 3.8. I haven't consciously imported anything from Visual Studio. I created the WiX project within Visual Studio 2010 using the WiX-supplied template and essentially wrote the was from scratch. I hear what you're saying regarding InstalUtilLib.dll! I have got the InstallUtil is evil and harmful message loud and clear. However, I'm trying to install a (.NET) WMI provider and, for that, InstallUtil (in the form of InstallUtilLib.dll) appears to be the only game in town. If anyone can point me to a working example of a viable alternative I'll be only too happy to use it. I've done a reasonable amount of searching and I've tried things like invoking the .NET installer class with no success. (Interestingly, that also appeared to work (ie the installer completed without error - it just didn't install the WMI class properly) when run via msi exec from an elevated shell but threw an exception (from the deferred CA) when run by double-clicking the msi - more or less similar symptoms!) InstallUtilLib.dll currently feels like the Last Chance Saloon. As regards VS MSIs - there haven't been any involved. The install DOES explicitly ask for elevation after the UI sequence. Having said all the above, one thing does occur to me. I have a VC++ project (complete with VS-supplied merge module for the VC++ redistributable) in the same installer. Could that be supplying the error dialog? I'll try removing that and see what happens. Thanks again for the response. I'm very new to WiX (and MSIs) so still trying to get this clear in my head. Regards David On 28 Apr 2014, at 18:34, Phil Wilson phildgwil...@gmail.com wrote: I'd back up from the error 2869 and see what's before that. That error is when it's decides to show you an error but doesn't like the error dialog, and the actual error is prior to that. Where did you get that error dialog from? That's a common error in Visual Studio setup projects, so did you import their dialogs into a WiX setup? InstallUtilLib.dll is also a Visual Studio setup project thing. I'd avoid it because it's unsupported since VS dropped setup projects, may have the wrong bitness depending on your install, and I don't know if you're even supposed to redistribute it like that. There's got to be a way to accomplish the task without it. If you just ported the setup from a Visual Studio MSI then I don't know if you'll get proper UAC handling, depending on the version of VS. If the install is set up right the install should explicitly ask for elevation after the UI sequence, because the install needs it. That might be the issue, but look for the error just before the 2869. --- Phil Wilson On Mon, Apr 28, 2014 at 9:58 AM, David Allen d.al...@qub.ac.uk wrote: I have an installer that invokes InstallUtilLib.dll via a set of CAs as documented in http://blogs.msdn.com/b/josealmeida/archive/2004/11/08/253831.aspx http://avinashkt.blogspot.co.uk/2007/05/how-to-create-installer-using-wix-which.html If I simply double-click on the MSI or run it using msiexec (NOT as an administrator) then it fails with Error 2869! The relevant files from the logfile (msiexec /Log ...) are Action 17:17:50: Install. DEBUG: Error 2869: The dialog ErrorDlg has the error style bit set, but is not an error dialog The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869. The arguments are: ErrorDlg, , MSI (c) (44:C0) [17:17:52:800]: Product: OpenPKI Tools -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2869. The arguments are: ErrorDlg, , Error 1001. MSI (s) (04!EC) [17:17:52:800]: DEBUG: Error 2769: Custom Action Install did not close 1 MSIHANDLEs. The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2769. The arguments are: Install, 1, CustomAction Install returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) Action ended 17:17:52: InstallFinalize. Return value 3. Action 17:17:52: Rollback. Rolling back action: If I run the installer via msiexec AS AN ADMINISTRATOR it works fine! For reference - the set of CAs, including the custom action Install to which the Error 2769 refers is as follows: - InstallExecuteSequence Custom Action=InstallSetProp After=StartServices$WmiProvidergt;2/Custom Custom Action=Install After=InstallSetProp$WmiProvidergt;2/Custom Custom Action=UninstallSetProp After=MsiUnpublishAssemblies$WmiProvider=2/Custom Custom Action
Re: [WiX-users] Setting properties in custom actions
This seems to have worked - thanks very much. David -Original Message- From: Blair [mailto:os...@live.com] Sent: 22 December 2009 13:45 To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Setting properties in custom actions The Condition on the components is evaluated during CostFinalize, not CreateShortcuts. You don't get the shortcuts because the components installing the shortcuts are not being installed due to the false condition on them. I would recommend moving your CheckApplicationLicence custom action sequence to before CostInitialize (as per the MSDN page on the CostFinalize action). -Original Message- From: David Allen [mailto:david.al...@1spatial.com] Sent: Tuesday, December 22, 2009 3:45 AM To: 'wix-users@lists.sourceforge.net' Subject: [WiX-users] Setting properties in custom actions I am updating an installer for a product that provides multiple applications and want to change it so that it creates shortcuts only for applications that have a valid licence. The basic approach is to define each shortcut in a separate component, to set a condition on the component based on the value of a property and to execute a custom action to set an appropriate value for the property based on the licence before the shortcuts are created. If I set different values when defining the properties, I can see the correct shortcuts get created. However, any changes to properties made by the custom action have no effect. Within the Product element - define the applications for which we may wish to create shortcuts ?define shortcuts=manage;translate;LAMPS2? - define a property for each application ?foreach _cut in $(var.shortcuts)? Property Id=$(var._cut) Value=0 / ?endforeach? - declare the custom action CustomAction Id=CheckApplicationLicence BinaryKey=CheckLicence.vbs Return=ignore VBScriptCall=CheckLicence / Binary Id=CheckLicence.vbs SourceFile=$(var.goth_product_root)\config\CheckLicence.vbs / - arrange for it to be invoked on install InstallExecuteSequence Custom Action=CheckApplicationLicence After=InstallFilesNOT (REMOVE = ALL) /Custom /InstallExecuteSequence - create the desktop shortcuts Property Id=INSTALL_DESKTOP_SHORTCUTS Value=1/ DirectoryRef Id=TARGETDIR Directory Id=DesktopFolder ?foreach _cut in $(var.shortcuts)? Component Id = C_DesktopShortCut.$(var._cut) Guid=* Condition INSTALL_DESKTOP_SHORTCUTS AND $(var._cut) = 1 /Condition ?define _prefix=Desktop? ?include $(var._cut)_shortcut.wxi? ?undef _prefix? RegistryValue Root=HKCU Key=Software\1Spatial\Developer\Installed Name=DesktopShortcuts.$(var._cut) Type=integer Value=1 KeyPath=yes/ /Component ?endforeach? /Directory /DirectoryRef The custom action VBScript is: Option Explicit Function CheckLicence() On error resume next MsgBox(CheckLicence: + Session.Property(LAMPS2)) Session.Property(LAMPS2) = 1 Session.Property(translate) = 1 MsgBox(CheckLicence: + Session.Property(LAMPS2)) End Function I see both message boxes pop up, showing that the property has been modified. In the log file, it appears this has been executed before the shortcuts: InstallFiles: File: Copying new files, Directory: , Size: Action ended 11:12:25: InstallFiles. Return value 1. Action 11:12:25: CheckApplicationLicence. Action start 11:12:25: CheckApplicationLicence. Action ended 11:12:29: CheckApplicationLicence. Return value 1. Action 11:12:29: CreateShortcuts. Creating shortcuts Action start 11:12:29: CreateShortcuts. CreateShortcuts: Shortcut: Creating shortcuts Action ended 11:12:29: CreateShortcuts. Return value 1. Action 11:12:29: WriteRegistryValues. Writing system registry values If I start with all the properties having a value of 0 and set them to 1 in the custom action, no shortcuts are created. If I start with a value of 1 and set them to 0 in the custom action, all the shortcuts are created. I presume I have made some sort of simple mistake, but I can't see what it is. Help much appreciated. I am using the final (July) release of WiX 3 on Windows XP SP2 32-bit. David -- David Allen, Telephone: +44 (0)1223 420 414 1Spatial Group Limited; Registered in England No. 4785688 VAT Reg. No. 816329821; Registered Office: Cavendish House; 6 Cambridge Business Park; Cambridge; CB4 0WZ; United Kingdom http://www.1spatial.com/ 1Spatial: unlocking data, empowering business Making geospatial data current, accessible, easily shared and trusted www.1spatial.com 1Spatial Group Limited
[WiX-users] Setting properties in custom actions
Resending this question since it appeared not to get through before Christmas, just after joining the list. I am updating an installer for a product that provides multiple applications and want to change it so that it creates shortcuts only for applications that have a valid licence. The basic approach is to define each shortcut in a separate component, to set a condition on the component based on the value of a property and to execute a custom action to set an appropriate value for the property based on the licence before the shortcuts are created. If I set different values when defining the properties in the main product XML, I can see the correct shortcuts get created. However, any changes to properties made by the custom action have no effect. Within the Product element - define the applications for which we may wish to create shortcuts ?define shortcuts=manage;translate;LAMPS2? - define a property for each application ?foreach _cut in $(var.shortcuts)? Property Id=$(var._cut) Value=0 / ?endforeach? - declare the custom action CustomAction Id=CheckApplicationLicence BinaryKey=CheckLicence.vbs Return=ignore VBScriptCall=CheckLicence / Binary Id=CheckLicence.vbs SourceFile=$(var.goth_product_root)\config\CheckLicence.vbs / - arrange for it to be invoked on install InstallExecuteSequence Custom Action=CheckApplicationLicence After=InstallFilesNOT (REMOVE = ALL) /Custom /InstallExecuteSequence - create the desktop shortcuts Property Id=INSTALL_DESKTOP_SHORTCUTS Value=1/ DirectoryRef Id=TARGETDIR Directory Id=DesktopFolder ?foreach _cut in $(var.shortcuts)? Component Id = C_DesktopShortCut.$(var._cut) Guid=* Condition INSTALL_DESKTOP_SHORTCUTS AND $(var._cut) = 1 /Condition ?define _prefix=Desktop? ?include $(var._cut)_shortcut.wxi? ?undef _prefix? RegistryValue Root=HKCU Key=Software\1Spatial\Developer\Installed Name=DesktopShortcuts.$(var._cut) Type=integer Value=1 KeyPath=yes/ /Component ?endforeach? /Directory /DirectoryRef The custom action VBScript is: Option Explicit Function CheckLicence() On error resume next MsgBox(CheckLicence: + Session.Property(LAMPS2)) Session.Property(LAMPS2) = 1 Session.Property(translate) = 1 MsgBox(CheckLicence: + Session.Property(LAMPS2)) End Function I see both message boxes pop up, showing that the property has been modified. In the log file, it appears this has been executed before the shortcuts: InstallFiles: File: Copying new files, Directory: , Size: Action ended 11:12:25: InstallFiles. Return value 1. Action 11:12:25: CheckApplicationLicence. Action start 11:12:25: CheckApplicationLicence. Action ended 11:12:29: CheckApplicationLicence. Return value 1. Action 11:12:29: CreateShortcuts. Creating shortcuts Action start 11:12:29: CreateShortcuts. CreateShortcuts: Shortcut: Creating shortcuts Action ended 11:12:29: CreateShortcuts. Return value 1. Action 11:12:29: WriteRegistryValues. Writing system registry values If I start with all the properties having a value of 0 and set them to 1 in the custom action, no shortcuts are created. If I start with a value of 1 and set them to 0 in the custom action, all the shortcuts are created. I presume I have made some sort of simple mistake, but I can't see what it is. Help much appreciated. I am using the final (July) release of WiX 3 on Windows XP SP2 32-bit. David -- David Allen, Development Manager - Core, Telephone: +44 (0)1223 420 414 1Spatial Group Limited; Registered in England No. 4785688 VAT Reg. No. 816329821; Registered Office: Cavendish House; 6 Cambridge Business Park; Cambridge; CB4 0WZ; United Kingdom http://www.1spatial.com/ 1Spatial: unlocking data, empowering business Making geospatial data current, accessible, easily shared and trusted www.1spatial.com 1Spatial Group Limited; Registered in England No. 4785688 VAT Reg. No. 816329821; Registered Office: Tennyson House; Cambridge Business Park; Cambridge; CB4 0WZ; United Kingdom IMPORTANT NOTICE This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender immediately and delete this e-mail from your system. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of 1Spatial Group Limited, its subsidiaries or associated companies, except where the author specifically states them to be the views of 1Spatial Group Limited, its subsidiaries or associated companies. 1Spatial
[WiX-users] Setting properties in custom actions
I am updating an installer for a product that provides multiple applications and want to change it so that it creates shortcuts only for applications that have a valid licence. The basic approach is to define each shortcut in a separate component, to set a condition on the component based on the value of a property and to execute a custom action to set an appropriate value for the property based on the licence before the shortcuts are created. If I set different values when defining the properties, I can see the correct shortcuts get created. However, any changes to properties made by the custom action have no effect. Within the Product element - define the applications for which we may wish to create shortcuts ?define shortcuts=manage;translate;LAMPS2? - define a property for each application ?foreach _cut in $(var.shortcuts)? Property Id=$(var._cut) Value=0 / ?endforeach? - declare the custom action CustomAction Id=CheckApplicationLicence BinaryKey=CheckLicence.vbs Return=ignore VBScriptCall=CheckLicence / Binary Id=CheckLicence.vbs SourceFile=$(var.goth_product_root)\config\CheckLicence.vbs / - arrange for it to be invoked on install InstallExecuteSequence Custom Action=CheckApplicationLicence After=InstallFilesNOT (REMOVE = ALL) /Custom /InstallExecuteSequence - create the desktop shortcuts Property Id=INSTALL_DESKTOP_SHORTCUTS Value=1/ DirectoryRef Id=TARGETDIR Directory Id=DesktopFolder ?foreach _cut in $(var.shortcuts)? Component Id = C_DesktopShortCut.$(var._cut) Guid=* Condition INSTALL_DESKTOP_SHORTCUTS AND $(var._cut) = 1 /Condition ?define _prefix=Desktop? ?include $(var._cut)_shortcut.wxi? ?undef _prefix? RegistryValue Root=HKCU Key=Software\1Spatial\Developer\Installed Name=DesktopShortcuts.$(var._cut) Type=integer Value=1 KeyPath=yes/ /Component ?endforeach? /Directory /DirectoryRef The custom action VBScript is: Option Explicit Function CheckLicence() On error resume next MsgBox(CheckLicence: + Session.Property(LAMPS2)) Session.Property(LAMPS2) = 1 Session.Property(translate) = 1 MsgBox(CheckLicence: + Session.Property(LAMPS2)) End Function I see both message boxes pop up, showing that the property has been modified. In the log file, it appears this has been executed before the shortcuts: InstallFiles: File: Copying new files, Directory: , Size: Action ended 11:12:25: InstallFiles. Return value 1. Action 11:12:25: CheckApplicationLicence. Action start 11:12:25: CheckApplicationLicence. Action ended 11:12:29: CheckApplicationLicence. Return value 1. Action 11:12:29: CreateShortcuts. Creating shortcuts Action start 11:12:29: CreateShortcuts. CreateShortcuts: Shortcut: Creating shortcuts Action ended 11:12:29: CreateShortcuts. Return value 1. Action 11:12:29: WriteRegistryValues. Writing system registry values If I start with all the properties having a value of 0 and set them to 1 in the custom action, no shortcuts are created. If I start with a value of 1 and set them to 0 in the custom action, all the shortcuts are created. I presume I have made some sort of simple mistake, but I can't see what it is. Help much appreciated. I am using the final (July) release of WiX 3 on Windows XP SP2 32-bit. David -- David Allen, Telephone: +44 (0)1223 420 414 1Spatial Group Limited; Registered in England No. 4785688 VAT Reg. No. 816329821; Registered Office: Cavendish House; 6 Cambridge Business Park; Cambridge; CB4 0WZ; United Kingdom http://www.1spatial.com/ 1Spatial: unlocking data, empowering business Making geospatial data current, accessible, easily shared and trusted www.1spatial.com 1Spatial Group Limited; Registered in England No. 4785688 VAT Reg. No. 816329821; Registered Office: Tennyson House; Cambridge Business Park; Cambridge; CB4 0WZ; United Kingdom IMPORTANT NOTICE This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender immediately and delete this e-mail from your system. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of 1Spatial Group Limited, its subsidiaries or associated companies, except where the author specifically states them to be the views of 1Spatial Group Limited, its subsidiaries or associated companies. 1Spatial Group Limited, its subsidiaries and associated companies will not be held liable for any legally binding obligations that are not the subject of an official
[WiX-users] Making Edit Controls required on dialog
I am trying to come up with a way to require edit controls on a dialog to be required before allowing user to click on the next button and move to the next dialog. Anyone have a way of doing this? Thanks. Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV ___ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users