Search code examples
windows-installerexecustom-action

Windows installer custom action error 1631


I'm creating msi-installer for a product and I need to launch web url in browser after installation. I use WIX 3.5 to create installer (but this probably doesn't important). The example I found in http://www.tramontana.co.hu/wix/lesson5.php#5.2 not work - installer log say's

"Action ended 15:27:30: LaunchBrowser. Return value 1631.".

I saw many posts about this problem in the internet but nobody provides solution (somebody found problem in multilanguage, somebody contacted Microsoft to solve that).

I can only guess that the problem is somewhere in security of Windows 7 (I encountered problem with it). Maybe windows installer is forbidden to launch exe-files (I tried many other examples with other exe-s but all had the same result).

Has anybody a general solution?


Solution

  • I suppose the problem was really with UAC security. To give a custom actinon administrative permissions we should make it deffered, like this:

    <CustomAction Id="LaunchBrowser" Directory="TARGETDIR" Impersonate="no" Execute="deferred" ExeCommand="[BrowserExePath] [LaunchingUrl]" Return="check"/>
    

    And I would highly recommend this blog post about custom actions - it completely changed my vision of them.