Wix checking netfreamwork 4 during installation of files - wix

I experienced strange behavior from wix. I created installation and when I wanted to test it, everything works fine, my dialog shows... But when I clicked on install, it looks like it is installing but in one third of installation files message box pop up saying: Installation of MYPRODUCT requires .NET Framework 4!
My first idea was that I have bad launch condition... but still it is launch condition and not install or what... so I deleted it a problem still is there...
Then I thought that it is maybe because of my custom action in C#, so I deleted it also, but problem is still there. Any idea?
Thanks
and btw. that launch conditions (netframework) are working fine...
EDIT: if I set InstallScope="perUser" it works...
Log:
Action start 12:54:33: INSTALL.
MSI (s) (A0:F4) [12:54:33:505]: Running ExecuteSequence
MSI (s) (A0:F4) [12:54:33:505]: Doing action: FindRelatedProducts
Action 12:54:33: FindRelatedProducts. Searching for related applications
Action start 12:54:33: FindRelatedProducts.
MSI (s) (A0:F4) [12:54:33:507]: Skipping FindRelatedProducts action: not run in maintenance mode
Action ended 12:54:33: FindRelatedProducts. Return value 0.
MSI (s) (A0:F4) [12:54:33:507]: Doing action: AppSearch
Action 12:54:33: AppSearch. Searching for installed applications
Action start 12:54:33: AppSearch.
AppSearch: Property: FM70HOME, Signature: FM70_HOME_PathRegistry
MSI (s) (A0:F4) [12:54:33:508]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (A0:F4) [12:54:33:508]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE32\SOFTWARE\Adobe\FrameMaker\7.0 3: 2
AppSearch: Property: FM71HOME, Signature: FM71_HOME_PathRegistry
MSI (s) (A0:F4) [12:54:33:509]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (A0:F4) [12:54:33:509]: PROPERTY CHANGE: Adding FM71HOME property. Its value is 'C:\Program Files (x86)\Adobe\FrameMaker7.1'.
AppSearch: Property: FM72HOME, Signature: FM72_HOME_PathRegistry
MSI (s) (A0:F4) [12:54:33:509]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (A0:F4) [12:54:33:509]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE32\SOFTWARE\Adobe\FrameMaker\7.2 3: 2
AppSearch: Property: FM80HOME, Signature: FM80_HOME_PathRegistry
MSI (s) (A0:F4) [12:54:33:510]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (A0:F4) [12:54:33:510]: PROPERTY CHANGE: Adding FM80HOME property. Its value is 'C:\Program Files (x86)\Adobe\FrameMaker8\'.
AppSearch: Property: FM10HOME, Signature: FM10_HOME_PathRegistry
MSI (s) (A0:F4) [12:54:33:510]: Note: 1: 2262 2: Signature 3: -2147287038
MSI (s) (A0:F4) [12:54:33:510]: PROPERTY CHANGE: Adding FM10HOME property. Its value is 'C:\Program Files (x86)\Adobe\AdobeFrameMaker10\'.
AppSearch: Property: NETFRAMEWORK45, Signature: NetFramework45
MSI (s) (A0:F4) [12:54:33:510]: Note: 1: 2262 2: Signature 3: -2147287038
Action ended 12:54:33: AppSearch. Return value 1.
MSI (s) (A0:F4) [12:54:33:511]: Doing action: LaunchConditions
Action 12:54:33: LaunchConditions. Evaluating launch conditions
Action start 12:54:33: LaunchConditions.
Installation of eAIP.wiz#rd requires .NET Framework 4!
MSI (s) (A0:F4) [12:54:40:586]: Product: Product -- Installation of Product requires .NET Framework 4!
Action ended 12:54:40: LaunchConditions. Return value 3.
Action ended 12:54:40: INSTALL. Return value 3.
also I have no idea why it check for NetFramework45...
My launch conditions are:
<Condition Message="Installation of Product requires .NET Framework 40 full!">NETFRAMEWORK40FULL OR REMOVE ~= "ALL"</Condition>
<Condition Message="Installation of Product requires Framework!">NOT WF_INSTALLED = "NOT INSTALLED" OR REMOVE ~= "ALL"</Condition>
<Condition Message="Can't find any of Adobe Framemaker 10.0, 8.0, 7.2, 7.1, 7.0 installation.! Product would not be working.">FM10HOME OR FM80HOME OR FM72HOME OR FM71HOME OR REMOVE ~= "ALL"</Condition>
And why it writes message that requries .Net Framework 4, when firt time launch condition passed... and when I have net framework 4 full installed?
Full log: http://pastebin.com/eEGCnQXu

Ok probably I found a solution.
The whole problem is logged in my log:
MSI (c) (B8:58) [12:54:23:788]: Doing action: FindRelatedProducts
Action 12:54:23: FindRelatedProducts. Searching for related applications
Action start 12:54:23: FindRelatedProducts.
FindRelatedProducts: Found application: xxx
MSI (c) (B8:58) [12:54:23:788]: PROPERTY CHANGE: Adding WIX_UPGRADE_DETECTED property. Its value is 'xxx'.
MSI (c) (B8:58) [12:54:23:788]: PROPERTY CHANGE: Adding MIGRATE property. Its value is 'xxx'.
FindRelatedProducts: Found application: xxx
which telling that I have already installed that product... at least some registry must be there... so I changed product guid and upgrade.. and it works... but it is still strange to me, why it tells that net framework 4 is missing when it passed at launch condition at beginning.

Related

Display custom error instead of WiX default error for "MainEngineThread is returning 1624"

After silent installation of WiX MSI, it writes the default MSI error when the Instance or Transform is invalid. It's not even reaching to custom action method before that MSI fails.
MSI (s) (A0:D0) [00:48:39:793]: Machine policy value 'TransformsSecure' is 0 MSI (s) (A0:D0) [00:48:39:793]: User policy value 'TransformsAtSource' is 0 MSI (s) (A0:D0) [00:48:39:793]: Note: 1: 2203 2: Instance26 3: -2147287038 MSI (s) (A0:D0) [00:48:39:793]: **MainEngineThread is returning 1624**
How to throw a custom message instead of a default MSI error saying instance or transform is invalid?

WIX-MSI: Password enabled uninstallation failing if msiexec is killed

We have a wix msi project and custom action dll. While uninstallation, it launches custom action to ask the user for the password and validate the password to allow uninstallation.
Custom Action:
<CustomAction Id="CA_Uninstall"
BinaryKey="BIN"
DllEntry="ValidatePassword"
Execute="immediate"
Impersonate="yes"
Return="check" />
Custom Action Call:
<Custom Action="CA_ProtectUninstall" After="InstallInitialize">
<![CDATA[Uninstalling = "true"]]>
</Custom>
Custom action Internally creates MFC dialog and validates the password.
Part of Custom Action:
UINT er = ERROR_INSTALL_FAILURE;
// launch MFC dialog and validates password
int ret = dlg.DoModal(hParent);
er = ret == IDOK ? ERROR_SUCCESS : ERROR_INSTALL_USEREXIT;
return WcaFinalize(er);
Problem:
This custom action is working fine and properly validates the password. Whenever uninstall is started, windows start process msiexec.exe in users context. Now there are 2 msiexec.exe processes, 1 in the system and another in user context.
While uninstallation, When password dialog is shown, if the user kills msiexec process from user context, password dialog gets closed and uninstall succeeds without validating the password.
Can anyone help me to resolve this issue?. Please feel free to suggest any better option to handle password protected uninstallation.
Uninstall logs for custom action:
MSI (s) (B4:A8) [16:21:20:873]: Doing action: CA_Uninstall
MSI (s) (B4:A8) [16:21:20:873]: Note: 1: 2205 2: 3: ActionText
Action ended 16:21:20: InstallInitialize. Return value 1.
MSI (s) (B4:90) [16:21:20:885]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSI4913.tmp, Entrypoint: ValidatePassword
Action start 16:21:20: CA_Uninstall.
MSI (s) (B4:90) [16:21:29:686]: Leaked MSIHANDLE (252) of type 790541 for thread 20604
MSI (s) (B4:90) [16:21:29:686]: Note: 1: 2769 2: CA_Uninstall 3: 1
MSI (s) (B4:90) [16:21:29:686]: Note: 1: 2205 2: 3: Error
MSI (s) (B4:90) [16:21:29:686]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 2769
ValidatePassword: ValidatePassword: UILevel=3
DEBUG: Error 2769: Custom Action CA_Uninstall 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: CA_Uninstall, 1,

Error occurred with custom action RegisterComPlus with WIX 3.9 and above

We, at Microsoft, had been using WIX toolset version 3.5.2519.0 for so long to build the installer and patches for our product named (System Center Service Manager aka SCSM).
Recently we need to update to WIX Toolset 3.14.0.1703 as this version has support for TLS1.2.
Building our project with WIX Toolset 3.14.0.1703 went fine, but while installing it, I am getting the below error:
Then I built the product one by one with all the WIX versions, and here are the results:
Product built with WIX ToolSet Version 3.8 and lower ar fine and installer worked fine.
But with ToolSet 3.9 and above, installer is getting failed with error: An error occurred while executing a custom action RegisterComPlus
Snippet of the logs:
Action start 21:11:37: RegisterTypeLibraries.
MSI (s) (48:B0) [21:11:37:585]: Doing action: SelfRegModules
Action ended 21:11:37: RegisterTypeLibraries. Return value 0.
Action start 21:11:37: SelfRegModules.
MSI (s) (48:B0) [21:11:37:588]: Doing action: RegisterComPlus
Action ended 21:11:37: SelfRegModules. Return value 1.
MSI (s) (48:B0) [21:11:37:589]: Note: 1: 2205 2: 3: Complus
MSI (s) (48:B0) [21:11:37:589]: Note: 1: 2228 2: 3: Complus 4: SELECT `ComponentId`, `FileName`, `Component`.`Directory_`, `ExpType`, `Component`.`Action`, `Component`.`Installed` FROM `Complus`, `Component`, `File` WHERE `Complus`.`Component_` = `Component` AND `Component`.`KeyPath` = `File`.`File` AND (`Action` = 1 OR `Action` = 2)
Action start 21:11:37: RegisterComPlus.
MSI (s) (48:B0) [21:11:37:591]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (48:B0) [21:11:37:591]: Machine policy value 'DisableRollback' is 0
MSI (s) (48:B0) [21:11:37:592]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
Action ended 21:11:37: RegisterComPlus. Return value 0.
MSI (s) (48:B0) [21:11:37:592]: Note: 1: 1402 2:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (48:B0) [21:11:37:592]: No System Restore sequence number for this installation.
MSI (s) (48:B0) [21:11:37:592]: Unlocking Server
MSI (s) (48:B0) [21:11:37:602]: Note: 1: 2717 2:
_Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F
DEBUG: Error 2717: Bad action condition or error calling custom action '_Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F'.
MSI (s) (48:74) [21:11:37:622]: I/O on thread 720 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 1244 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 3392 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 928 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 680 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 4528 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2156 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2316 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 3980 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 5172 could not be cancelled. Error: 1168
MSI (s) (48:74) [21:11:37:622]: I/O on thread 2724 could not be cancelled. Error: 1168
MSI (s) (48:B0) [21:11:37:622]: Product: Microsoft System Center Service Manager -- The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2717. The arguments are: _Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F, ,
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2717. The arguments are: _Set_Rollback_RemoveCodeGroup.1CA03A32_06E0_4726_8E63_FEA4484D9D6F, ,
Action ended 21:11:37: INSTALL. Return value 3.
Are there any changes taken in WIX Toolset 3.9 and above is breaking my installer?
Any resolution for this?
Hmm, no suggestions so far. This will not be an answer, but some suggestions to try to get you going helping yourself. This happens all too often for deployment questions since they are hard to debug or determine what is going on with the limited information available.
It looks to me like this might not be a COM+ problem since it looks like that custom action completes OK:
Action ended 21:11:37: RegisterComPlus. Return value 0.
Let's maybe try a few long-shots. Bear with me since a lot of this will be a bit out there. Torpedos. Full spread and all that :-) (run for cover):
Comparative Misery - :-): I might compare the working MSI and the new MSI using the compare approaches found here. I don't think you will find a lot, but should probably be done. Compare MSIs directly and decompile using dark.exe? The latter makes little logical sense, but I want to see if something has changed in how WiX links the MSI.
Eliminate Complexity: I like to take out complex parts and see if the rest of the setup installs OK. This can be a real waste of time, but sometimes illuminates.
I would take out that merge module that adds that custom action and verify that the rest of the package installs as expected. Sometimes this doesn't work if there is high coupling going on for the custom actions (obviously).
You can also set a condition for some custom actions to 0. This should prevent the custom action from running. You can add AND 0 if there is an existing condition.
Disable Rollback?: Another long-shot. Disable MSI rollback and try a test install on a clean virtual? Just to see if problems are in the rollback custom actions. I would use the DISABLEROLLBACK property to disable rollback. Note that disabling rollback is no solution though! (has to be mentioned for others who find this).
Custom Action Source Access: If you have access to the custom action source code I would try to debug interactively using Visual Studio as described here: Debug C# Custom Actions. You compile the code in debug mode (so you have debug dll's in your MSI - be sure to not include those accidentally for public release!) and show a message box from the custom action, then you attach the Visual Studio debugger and step through the code. For native code attach to msiexec.exe, for managed code attach to rundll32.exe.

Wix Error in action CommitIIS7ConfigTransaction

Environment Details: Installation package is created via a TFS continuous integration build process (using Wix 3.10.3) that has an agent on the deployment test server (A TFS user is running as a service on the release box) where I am having the issue below. Package is downloaded and installed via the release agent of TFS using the powershell function (NOT powershell on targeted machine) with this script, which runs the installation in admin mode if not already in admin mode.
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Echo "This script needs to be run As Admin"
Start-Process powershell -ArgumentList '-noprofile -file [ps1file]' -verb RunAs
Break
}
else
{
Echo "Running as Admin"
MSIEXEC /i "[PathToMSI]" /qn /L*v "[PathToLog]" INSTALLDIR="[INSTALLPATH]" WEBAPPNAME="[Name]" AUTHMETHOD="[METHOD]" [SQLCONNECTIONPROPERTIES...]
Echo "Script complete"
}
First off I can install this product without issue the first time on the server in question, it is the updates that are producing strange behavior. The agent automated update produces this text with no discernible error code, minus the generic 1603.
Action start 11:20:45: CommitIIS7ConfigTransaction.
MSI (s) (74!18) [11:20:45:585]: PROPERTY CHANGE: Adding ConfigureIIs7Exec property. Its value is '**********'.
MSI (s) (74!18) [11:20:45:585]: Doing action: ConfigureIIs7Exec
MSI (s) (74:34) [11:20:45:632]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (74:34) [11:20:45:632]: Machine policy value 'DisableRollback' is 0
MSI (s) (74:34) [11:20:45:632]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (74:34) [11:20:45:632]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (74:34) [11:20:45:632]: No System Restore sequence number for this installation.
MSI (s) (74:34) [11:20:45:632]: Unlocking Server
MSI (s) (74:34) [11:20:45:632]: Note: 1: 1708
MSI (s) (74:34) [11:20:45:632]: Product: MyProduct -- Installation failed.
MSI (s) (74:34) [11:20:45:632]: Windows Installer installed the product. Product Name: MyProduct . Product Version: 1.1.1.1. Product Language: 1033. Manufacturer: Me. Installation success or error status: 1603.
But when I run this update manually I get this error:
MSI (s) (34!1C) [16:27:41:979]: Doing action: StartIIS7ConfigTransaction
MSI (s) (34!1C) [16:27:41:979]: Product: MyProduct -- Error 26031. Failed to schedule transaction for changes to IIS. (-2147418113 )
MSI (s) (34:48) [16:27:41:994]: Note: 1: 2265 2: 3: -2147287035
MSI (s) (34:48) [16:27:41:994]: Machine policy value 'DisableRollback' is 0
MSI (s) (34:48) [16:27:41:994]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (34:48) [16:27:41:994]: Note: 1: 1402 2: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\Rollback\Scripts 3: 2
MSI (s) (34:48) [16:27:41:994]: No System Restore sequence number for this installation.
MSI (s) (34:48) [16:27:41:994]: Unlocking Server
MSI (s) (34:48) [16:27:42:010]: Note: 1: 1708
MSI (s) (34:48) [16:27:42:010]: Product: MyProduct -- Installation failed.
MSI (s) (34:48) [16:27:42:010]: Windows Installer installed the product. Product Name: MyProduct. Product Version: 1.1.1.1. Product Language: 1033. Manufacturer: Me. Installation success or error status: 1603.
I have scoured this and other forums looking for any indication of how to fix it, but have yet to turn up anything related to this specific error code/text. I have exhausted all options I could think of over the last few days. Any help would be appreciated.

msi is complaining that it is unable to run DLL error 1723(1157)

I am creating a sample msi. I am using a C++ custom action. I am able to install the msi on Windows 7 32bit. But I am unable to install it on Windows Server 2008 64bit.
The following is the code:
<Binary Id="BinaryId.dll"
SourceFile="Test.dll" />
<CustomAction Id="TestFunc" BinaryKey="BinaryId" DllEntry="TestFunc"
Execute="immediate" Return="check" />
<InstallExecuteSequence>
<Custom Action="TestFunc" Before="InstallInitialize" Overridable="yes">1</Custom>
</InstallExecuteSequence>
I am getting the following error from the msi logs:
Invoking remote custom action. DLL: C:\Windows\Installer\MSI84EB.tmp, Entrypoint: MSI (s) (8C:30) [01:28:17:180]: Doing action: TestFunc
MSI (s) (8C:30) [01:28:17:180]: Note: 1: 2205 2: 3: ActionText
Action start 1:28:17: TestFunc.
MSI (s) (8C:A0) [01:28:17:184]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI8E90.tmp, Entrypoint: TestFunc
CustomAction TestFunc returned actual error code 1157 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (8C:30) [01:28:17:218]: Note: 1: 1723 2: TestFunc3: TestFunc4: C:\Windows\Installer\MSI8E90.tmp
MSI (s) (8C:30) [01:28:17:218]: Note: 1: 2205 2: 3: Error
MSI (s) (8C:30) [01:28:17:218]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1723
MSI (c) (1C:74) [01:28:17:224]: Font created. Charset: Req=0, Ret=0, Font: Req=MS Shell Dlg, Ret=MS Shell Dlg
Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action TestFunc, entry: TestFunc, library: C:\Windows\Installer\MSI8E90.tmp
MSI (s) (8C:30) [01:28:18:451]: Note: 1: 2205 2: 3: Error
MSI (s) (8C:30) [01:28:18:451]: Note: 1: 2228 2: 3: Error 4: SELECT `Message` FROM `Error` WHERE `Error` = 1709
MSI (s) (8C:30) [01:28:18:451]: Product: TestCa -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action TestFunc, entry: TestFunc, library: C:\Windows\Installer\MSI8E90.tmp
Thanks a lot for your valuable suggestions and help that would lead to resolve this issue. :)
Have a look at what you are using the custom action method TestFunc. 1157 error means that:
One of the library files needed to run this application cannot be
found.
So you might be using some library that is not available on Windows Server 2008 64bit but it is available on Windows 7 32bit.
Writing custom actions in managed .Net code is not easy and involves manually manipulating the project files. If you can easily write the same code in VB Script, JavaScript or C++, I'd recommend taking that path instead.
Here's the tutorial I used: Creating Custom Action for WIX Written in Managed Code without Votive.