Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 453
Sasha Avatar asked Oct 25 '22 09:10

Sasha


1 Answers

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.

like image 193
Sasha Avatar answered Dec 09 '22 12:12

Sasha