MSI rollback problem. Error 1603 - related to CustomAction

Answered MSI rollback problem. Error 1603 - related to CustomAction

  • Tuesday, February 07, 2012 7:48 AM
     
     

    Problem


    I have a MSI package created in Visual Studio 2010 that fails. The package contains installation of some .NET files. I am targeting .NET 3.5.

    I get “the installer has interrupted before x could be installed. You need to restart the installer and try again” during installation. The installer rolls back. This package has worked for years and suddenly started failing.

    Works on some machines


    It seems like it fails on Windows XP and Windows 2003 and works on Windows 7 and Windows 2008. I have tested on both 32 and 64 bit Windows 2003 and it fails and it works on both 32 and 64 bit Windows 7.

    msiexec debugging


    If I add debugging to msi I get these last lines before rolling back:

    CustomActionSchedule(Action=_7E766DE4_B2DF_40EB_9662_68D62A41D83B.install,ActionType=3073,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=install /LogFile= /INSTALLTYPE=1 "C:\Program Files\VisualCron\VisualCronService.exe" "C:\DOCUME~1\Henrik\LOCALS~1\Temp\CFG5.tmp")
    MSI (s) (B8:20) [07:55:03:130]: Creating MSIHANDLE (13) of type 790536 for thread 2336
    MSI (s) (B8:78) [07:55:03:130]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI9.tmp, Entrypoint: ManagedInstall
    MSI (s) (B8:28) [07:55:03:130]: Generating random cookie.
    MSI (s) (B8:28) [07:55:03:941]: Created Custom Action Server with PID 2428 (0x97C).
    MSI (s) (B8:D0) [07:55:11:663]: Running as a service.
    MSI (s) (B8:E8) [07:55:11:858]: Hello, I'm your 32bit Elevated custom action server.
    MSI (s) (B8:78) [07:55:12:369]: Closing MSIHANDLE (13) of type 790536 for thread 2336
    Action ended 7:55:12: InstallExecute. Return value 3.

    If I look in the event viewer it says: “Installation success or error status: 1603.”

    The problem is related to my custom actions. If I remove the custom actions it works. I tried to add some debugging in the .NET code of the custom action but it never get so far as running any code.

    Possible reasons?


    I recently installed the developer preview of Visual Studio 11. My guess it could be related to .NET version?

    Other anomalities



    setup.exe

    If I produce a setup.exe that cannot be run. I get an error “is not a valid Win32 application”. I compile the setup as x86. If I run it on x64 machine it works and I can see that it runs in 32 bit mode (*32)

    I have tried:


    1. I rolled back to a previous version of the installer - this is not the problem
    2. I have tried .NET cleanup tool to remove all traces of .NET - then just installed .NET 3.5 - did not help

All Replies

  • Tuesday, February 07, 2012 3:22 PM
     
     Answered
    This was solved by uninstalling Visual Studio Developer Preview 11 and re-installing Visual Studio 2010. Once that was done I was able to compile setup.exe that could be run on any machine.
  • Wednesday, February 08, 2012 7:33 AM
    Moderator
     
     
    Hi Henrik,

    Thank you for your active participation in the MSDN community. I’m glad to hear that you resolve this issue. And thank you for sharing your solutions and experience here. It will be very beneficial for other community members who have similar questions.

    If you have any difficulty in future programming, we welcome you to post here again.

    Regards,

     


    Helen Zhou [MSFT]
    MSDN Community Support | Feedback to us

  • Friday, March 09, 2012 4:18 PM
     
     

    I ran into the same problem right after installing Visual Studio 11 Beta.   To work around, I uninstalled VS 11 Beta but reverted to a system restore point instead of reinstalling VS2010.  The server this was failing on was Windows Server 2003 x64 Standard w/SP2.  The installation was originally created on a Windows XP x86 machine, but for the last few releases the developer machine has been Windows 7 Ultimate x64 w/SP1.  Setup targets x86, application targets any CPU.  My installer includes a custom action that runs an executable installed by the .msi -- the failure occurs before or at this custom action step.



    • Edited by scH4MMER Friday, March 09, 2012 4:45 PM
    •  
  • Wednesday, March 14, 2012 5:02 PM
     
     

    I've run into the same problem.  Will install on Win7 but not XP. I had install VS 11 Beta on Win7 64bit Box and now the installs created on that box won't run on XP.  I couldn't use a restore point because I didn't have one prior to putting on the Beta (only one part way through the install).  I uninstalled the Beta, uninstalled VS2010 and VS2010 SP1, and then reinstalled VS2010 and the VS2010 SP1.   Below is the log file from one of the XP boxes that can no longer install it (and yes, they did before) - also, the message in the event viewer is below.  Can someone point me in a direction?  Starting to go bonkers !!  :-)

    MSI (s) (08:E4) [10:38:30:107]: Executing op: CustomActionSchedule(Action=_49412036_961C_407C_834A_027AD16005BD.install,ActionType=3073,Source=BinaryData,Target=ManagedInstall,CustomActionData=/installtype=notransaction /action=install /LogFile= "C:\Program Files\IM Flash Technologies\GPA2\InstallHelper.dll" "C:\DOCUME~1\MJBURG~1\LOCALS~1\Temp\CFG5E.tmp")
    MSI (s) (08:E4) [10:38:30:170]: Creating MSIHANDLE (30) of type 790536 for thread 740
    MSI (s) (08:E4) [10:38:30:170]: Invoking remote custom action. DLL: C:\WINNT\Installer\MSI63.tmp, Entrypoint: ManagedInstall
    MSI (s) (08:80) [10:38:30:170]: Generating random cookie.
    MSI (s) (08:80) [10:38:30:185]: Created Custom Action Server with PID 5116 (0x13FC).
    MSI (s) (08:44) [10:38:30:263]: Running as a service.
    MSI (s) (08:44) [10:38:30:263]: Hello, I'm your 32bit Elevated custom action server.
    MSI (s) (08:E4) [10:38:30:295]: Closing MSIHANDLE (30) of type 790536 for thread 740
    Action ended 10:38:30: InstallExecute. Return value 3.

    Event Viewer:

    Event Type:    Information
    Event Source:    MsiInstaller
    Event Category:    None
    Event ID:    1042
    Date:        3/14/2012
    Time:        10:38:47 AM
    User:        NT AUTHORITY\SYSTEM
    Computer:    ComputerName
    Description:
    The description for Event ID ( 1042 ) in Source ( MsiInstaller ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: \\...Removed for security...\GPA2Setup.msi, 3696, (NULL), (NULL), (NULL), , .

    Event Type:    Information
    Event Source:    MsiInstaller
    Event Category:    None
    Event ID:    11708
    Date:        3/14/2012
    Time:        10:38:49 AM
    User:        Domain\mjburgess
    Computer:    computername
    Description:
    The description for Event ID ( 11708 ) in Source ( MsiInstaller ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Product: GPA2 -- Installation failed., (NULL), (NULL), (NULL), (NULL), , .
    Data:
    0000: 7b 33 41 41 33 32 44 37   {3AA32D7
    0008: 35 2d 41 41 41 41 2d 34   5-AAAA-4
    0010: 36 41 41 2d 38 43 35 38   6AA-8C58
    0018: 2d 36 30 46 41 32 30 31   -60FA201
    0020: 43 34 35 37 35 7d         C4575}  

  • Thursday, March 15, 2012 3:51 PM
     
     

    More Information:

    I opened up 2 msi's in SuperOrca, one that works and one that doesn't - there are a couple of obvious differences (files that I've changed) , but 2 that I don't understand are under the binary entry:  the InstallUtil and the VSDNETCFG.  It appears that the VSDNETCFG changes just about every MSI (I looked at 3 that work and the 1 that doesn't)  The InstallUtil is the same in all the versions that work - but is larger in the MSI that doesn't work on XP.  What is this file?  where is it being loaded from?

  • Tuesday, March 27, 2012 1:01 PM
     
     Proposed

    I went a little further and using SuperOrca extracted the InstallUtil binaries from both a working and a non-working MSI file.  As it turns out the InstallUtil binary is actually the InstallUtilLib.dll found at %WINDIR%\Microsoft.NET\Framework\v4.0.30319 (and %WINDIR%\Microsoft.NET\Framework64\v4.0.30319 for 64-bit operations).

    The version number for InstallUtilLib.dll that does work with Windows XP is 4.0.30319.1 while VS11 Beta appears to upgrade it to 4.0.30319.17379.

    Replacing the Binary in the MSI using Orca (ex. http://msdn.microsoft.com/en-us/library/kz0ke5xt.aspx) with the earlier version will resolve this issue.  You could also probably resolve this by replacing the actual file in the Framework directory with the earlier version (exported from a working MSI file) and re-building the package.

    This would mean you don't need to uninstall VS 11 and re-install VS2010 SP1...

    • Proposed As Answer by rfoster Tuesday, March 27, 2012 1:01 PM
    •  
  • Tuesday, March 27, 2012 2:15 PM
     
     Proposed

    Update: I reported this issue to Microsoft, and they just updated its status to "fixed," so hopefully the retail release will not have this issue.

    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=730051

    • Proposed As Answer by scH4MMER Tuesday, March 27, 2012 2:15 PM
    •  
  • Wednesday, April 25, 2012 12:28 AM
     
     

    rfoster, you the man!  This was the exact problem.  I replaced the InstallUtilLib.dll using Orca and it works again for 2003 and XP.

    Save yourself half a day - all the uninstalling and rolling back isn't required.  The real culprit is the .NET framework 4.5 Beta.  Just remove this and reinstall .NET 4.0 framework.


    • Edited by PR Lafferty Wednesday, April 25, 2012 1:03 AM
    •