Wix Cab error code 1 - installation

I am getting the following error in the log file:
Action start 12:11:52: CreateIisConfigs.
MSI (s) (0C:7C) [12:11:52:731]: Invoking remote custom action. DLL: C:\WINDOWS\Installer\MSIFD80.tmp, Entrypoint: CreateIisConfigs
MSI (s) (0C:E8) [12:11:52:731]: Generating random cookie.
MSI (s) (0C:E8) [12:11:52:733]: Created Custom Action Server with PID 10316 (0x284C).
MSI (s) (0C:F0) [12:11:52:751]: Running as a service.
MSI (s) (0C:F0) [12:11:52:753]: Hello, I'm your 32bit Impersonated custom action server.
SFXCA: Extracting custom action to temporary directory: C:\WINDOWS\Installer\MSIFD80.tmp-\
SFXCA: Failed to extract to temporary directory. Cabinet error code 1.
CustomAction CreateIisConfigs returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 12:11:52: CreateIisConfigs. Return value 3.
Action ended 12:11:52: INSTALL. Return value 3.
I am using <MediaTemplate EmbedCab="yes" /> and WIX Toolset 3.10.
Thanks for your time.

You have a security/permission issue.
Check the line before this issue.
Also it could be related to exe file you are using in your CA.
Hope it helped.

Okay so i sort this issue out.In my specific case i have a post-build action that copies the msi file to the Resources folder of C# class library project.Somehow the msi got corrupted and thats why i had this Cabinet error code 1 .After i manually copy paste the msi the error is gone.

Related

MSI Install Failed - Error 1723

I'm having trouble installing our software on certain machines when installing our .msi built in VS2015.
Without VS2015, I get this in the log file:
MSI (s) (24:64) [11:21:22:095]: Doing action: InstallFinalize
Action 11:21:22: InstallFinalize.
Action start 11:21:22: InstallFinalize.
MSI (s) (24:64) [11:21:22:095]: User policy value 'DisableRollback' is 0
MSI (s) (24:64) [11:21:22:095]: Machine policy value 'DisableRollback' is 0
Action 11:21:22: RollbackCleanup. Removing backup files
MSI (s) (24:64) [11:21:22:585]: Creating MSIHANDLE (13) of type 790536 for thread 8036
MSI (s) (24:74) [11:21:22:595]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIAE3F.tmp, Entrypoint: _KSTInstallSC#4
MSI (s) (24:74) [11:21:22:595]: Generating random cookie.
MSI (s) (24:74) [11:21:22:645]: Created Custom Action Server with PID 1160 (0x488).
MSI (s) (24:5C) [11:21:22:765]: Running as a service.
MSI (s) (24:5C) [11:21:22:775]: Hello, I'm your 32bit Elevated Non-remapped custom action server.
CustomAction _3F7B94EF_231A_421E_BF8B_C0760F3B266E returned actual error code 1157 (note this may not be 100% accurate if translation happened inside sandbox)
MSI (s) (24:74) [11:21:22:975]: Closing MSIHANDLE (13) of type 790536 for thread 8036
MSI (s) (24:64) [11:21:22:975]: Note: 1: 1723 2: _3F7B94EF_231A_421E_BF8B_C0760F3B266E 3: _KSTInstallSC#4 4: C:\Windows\Installer\MSIAE3F.tmp
MSI (s) (24:64) [11:21:22:975]: Note: 1: 2262 2: Error 3: -2147287038
MSI (c) (8C:0C) [11:21:22:975]: Note: 1: 2262 2: Error 3: -2147287038
DEBUG: Error 2835: The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog,
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 _3F7B94EF_231A_421E_BF8B_C0760F3B266E, entry: _KSTInstallSC#4, library: C:\Windows\Installer\MSIAE3F.tmp
MSI (s) (24:64) [11:21:25:796]: Note: 1: 2262 2: Error 3: -2147287038
MSI (s) (24:64) [11:21:25:796]: Product: KST -- 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 _3F7B94EF_231A_421E_BF8B_C0760F3B266E, entry: _KSTInstallSC#4, library: C:\Windows\Installer\MSIAE3F.tmp
I have looked in Visual Studio and there are no custom actions that match anything in the log file.
Something to note, after installing VS2015 on a test PC, the installation worked fine, so it's definitely missing a DLL or something. But installing VS2015 on all of our clients' machines isn't practical.
Is there any way I can package the files needed along with the msi? And if so, how can I find the name of the depended DLL files?
Depending on how you built this package, there's probably a better way to track this down in the project. But let's pretend we received this package and want to make it work despite it being faulty.
You know the entry point is _KSTInstallSC#4, which gives you something to look for in the Target column of the CustomAction table in the built MSI using your favorite MSI editing program. The record in that table should refer with its Source column to a row in the Binary table that contains the DLL. Once you extract that DLL, you can use any tool that shows you dependencies, such as Dependency Walker, CFF Explorer, or even dumpbin /imports.
As for how to fix it, on a single machine just install the dependency. But to fix it in the package, you will probably have to change how the DLL is being built. For instance, you might make it import the C++ runtime statically so it has no unusual external run time dependencies.
You've done something related to the KST product, it's a C++ application that apparently you're running as a custom action, either deliberately or through including a merge module. Error 1157 indicates a failure to load, so it must have a dependency on at least one other Dll that isn't installed.
Judging by the GUID appended (3F7B94EF_231A_421E_BF8B_C0760F3B266E) to the custom action name I would say you have a merge module included into your package/project, that runs this custom action, just as Phil mentioned.
I had the same issue just recently, and in my case it was Windows Defender that had a false positive on that tmp-file that is mentioned in the MSI log as the DLL that it can't find. Defender identified it as a virus and removed the file before MSI package could use it.
So, try disabling Defender/any other Antivirus software and try again.
For me helped answer by Michael Urman
I compilled library in VS2019 in Release mode so in library dependences I saw vcruntime140.dll (pic. from CFF Explorer) and this DLL I could find in C:/Windows/System32 . This librares you can install through C++ Redistributable packedges.
For more explanation of problem - in previous I compilled project in Debug mode and as dependency in DLL I saw vcruntime140D.dll - and on machine without VS I got error Error 1723 on my Custom Action

Wix CAQuietExec - Path gets prefixed with 'C:\Windows\SysWOW64\'

I provided a path like this as the Property Value: [INSTALLFOLDER]Program Scripts\Script1.rss
where INSTALLFOLDER is C:\Program Files (x86)\ABCCompany\DEFProductInstaller\
But it somehow gets interpreted like this:
C:\Windows\SysWOW64\C:\Program Files (x86)\ABCCompany\DEFProductInstaller\Program Scripts\Script1.rss
This is the Property and the associated CustomAction
<Property Id="CreateDataSources"
Value=""rs.exe" -i "[INSTALLFOLDER]Program Scripts\Script1.rss""/>
<CustomAction Id="CreateDataSources" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="check" Impersonate="no"/>
This is the log:
Property(S): SystemFolder = C:\Windows\SysWOW64\
...
MSI (s) (8C:44) [14:41:41:202]: Executing op: CustomActionSchedule(Action=CreateDataSources,ActionType=3073,Source=BinaryData,Target=CAQuietExec,CustomActionData="rs.exe" -i "[INSTALLFOLDER]Program Scripts\Script1.rss" -s http://localhost/ReportServer -v DataSourcePath="" -v DBServer="." -v InitialCatalog="MyDB" -v UserId="" -v Password="" -v IntegratedSecurity="True")
MSI (s) (8C:78) [14:41:41:211]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIFB.tmp, Entrypoint: CAQuietExec
MSI (s) (8C:90) [14:41:41:211]: Generating random cookie.
MSI (s) (8C:90) [14:41:41:213]: Created Custom Action Server with PID 16716 (0x414C).
MSI (s) (8C:C4) [14:41:41:237]: Running as a service.
MSI (s) (8C:C4) [14:41:41:238]: Hello, I'm your 32bit Impersonated custom action server.
CAQuietExec: Could not find a part of the path 'C:\Windows\SysWOW64\C:\Program Files (x86)\ABCCompany\DEFProductInstaller\Program Scripts\Script1.rss'.
CAQuietExec: Error 0x80070001: Command line returned an error.
CAQuietExec: Error 0x80070001: CAQuietExec Failed
Any idea as to what I'm doing wrong?
UPDATE Changing the <Property> value to an absolute path fixes this issue.
<Property Id="CreateDataSources"
Value='"rs.exe" -i "C:\Program Files (x86)\ABCCompany\DEFProductInstaller\Program Scripts\Script1.rss"/>
But I need it to work with INSTALLFOLDER
The log isn't failing the way I expect it to fail (perhaps there has been a recent WiX change) but in my experience the call to rs.exe has to not only be wrapped in quotes but it has to be an absolute path. "[SystemFolder]rs.exe"
BTW, it seems you are using RS.exe to deploy reporting services changes. I don't believe that file is legally redistributable. I was working for a company about 6 years ago where I wrote a table driven C#/DTF custom action that consumed the SSRS web service to publish directories, reports and datasources. I never implemented rollback though. Also this is one type where Impersonate=No may end poorly. This is due to the fact that in some situations the logged on user might have writes to the SSRS web service and the SYSTEM account may not.
You need to provide a full path to the .exe you want to run. CreateProcess does not use the system path: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682425%28v=vs.85%29.aspx

WIX Custom Action Execution failed

I have created a setup to execute scripts on database. But when i tried to run the setup i have got the following error which i have fetched out from logs.
Doing action: VerifyConnection Action 12:03:17: VerifyConnection.
Action start 12:03:17: VerifyConnection. MSI (c) (38:E0)
[12:03:17:739]: Invoking remote custom action. DLL: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp, Entrypoint: VerifyConnection MSI (c) (38:A4) [12:03:17:741]: Cloaking enabled. MSI (c) (38:A4)
[12:03:17:741]: Attempting to enable all disabled privileges before calling Install on Server MSI (c) (38:A4)
[12:03:17:742]: Connected to service for CA interface. MSI (c) (38:54)
[12:03:17:788]: Note: 1: 1723 2: VerifyConnection 3: VerifyConnection 4: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp 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 VerifyConnection, entry: VerifyConnection, library: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp MSI (c) (38:54)
[12:03:19:186]: Product: CRMnext -- 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 VerifyConnection, entry: VerifyConnection, library: C:\Users\adityak\AppData\Local\Temp\MSI4F99.tmp
Action ended 12:03:19: VerifyConnection. Return value 3.
DEBUG: Error 2896: Executing action VerifyConnection failed
Any Idea how to resolve this issue???
Make sure your action has the correct signature; especially the method needs to be "public" and "static", i.e. something along the lines of "public static ActionResult doSomething(Session session)"
Mark the mehtod with the "CustomAction" attribute, so it gets exported
When dealing with multiple custom actions implemented in one dll, make sure you are not running into a known MakeSfxCA bug (cf. http://wixtoolset.org/issues/4502/ or Adding a new Custom Action to a project prevents an existing Custom Action from being run)

MSI Installer Fails Remotely - "A Newer Version" is already installed, even after uninstalling

Rather bizarre behavior I've started having with our automated builds. I have a very simple, windows service .msi (built in Visual studio 2010) that is compiled on our central build/repo server, gets uploaded to our dev server, and is then remotely installed from the build/repo server (command-line via ssh using plink) on the dev server.
This was working for a long time until recently the automated builds started failing 100% of the time. The verbose installation logs for the msi state that "A newer version of this product is already installed." I remoted into the dev server, checked the msi, and had no problem manually installing it myself on the server (via command-line and GUI). I then uninstalled the service from the "Programs & Features" window, verified the files and entries were deleted, tried again to install it remotely from the build server, and got the exact same error again. The service just doesn't install remotely because it thinks a newer one is still installed (even though I already uninstalled it), but I can do it manually myself.
EDIT
Adding some of the log text.
Action start 15:47:16: AppSearch.
MSI (s) (B8:F0) [15:47:16:265]: Doing action: FindRelatedProducts
Action ended 15:47:16: AppSearch. Return value 1.
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
MSI (s) (B8:F0) [15:47:16:267]: Using cached product context: User non-assigned for product: BA4139E4B48F8264ABFF918A7B583A0B
Action start 15:47:16: FindRelatedProducts.
MSI (s) (B8:F0) [15:47:16:267]: PROPERTY CHANGE: Adding NEWERPRODUCTFOUND property. Its value is '{4E9314AB-F84B-4628-BAFF-19A8B785A3B0}'.
MSI (s) (B8:F0) [15:47:16:268]: Doing action: ERRCA_CANCELNEWERVERSION
Action ended 15:47:16: FindRelatedProducts. Return value 1.
MSI (s) (B8:F0) [15:47:16:269]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'ERRCA_CANCELNEWERVERSION'
Action start 15:47:16: ERRCA_CANCELNEWERVERSION.
MSI (s) (B8:F0) [15:47:16:269]: Product: Product.Services -- Unable to install because a newer version of this product is already installed.
Unable to install because a newer version of this product is already installed.
Action ended 15:47:16: ERRCA_CANCELNEWERVERSION. Return value 3.
Action ended 15:47:16: INSTALL. Return value 3.
I was receiving the same exact error as #Tom was getting: "- Newer version already installed"
I was able to fix by following these exact steps:
1. Run the MSI with verbose logging enabled
msiexec /i "{Path to msi}.msi" /L*V "c:\myLog.log"
2. Open the log file that was produced from the above command and copy the GUID that is shown in the line
FindRelatedProducts: Found application: {FB0B54D2-9C47-4196-BF0E-B6EEBF754E22}
Using the copied GUID, run the following command
msiExec /x {FB0B54D2-9C47-4196-BF0E-B6EEBF754E22}
At this point, the old service was uninstalled and I then proceeded to install the service with MSI without any issues. Hope this helps.
MSI (s) (B8:F0) [15:47:16:267]: PROPERTY CHANGE: Adding NEWERPRODUCTFOUND property. Its value is '{4E9314AB-F84B-4628-BAFF-19A8B785A3B0}'.
It sounds like there is an old version of the install on the machine somewhere even though it may not show up in Programs and Features. I would try the following to see if it fixes your problem:
Try uninstalling via commandline msiexec /x {4E9314AB-F84B-4628-BAFF-19A8B785A3B0}
Search for the product code {4E9314AB-F84B-4628-BAFF-19A8B785A3B0} in the registry to see if there are remnants of a previous installation. If you find that product code, you can try manually deleting those entries (AT YOUR OWN RISK) to see if that solves your problem.
Another solution that worked for me was:
Select your Setup project in the VS solution and press F4 to show the properties window
Change GUID for ProductCode and UpgradeCode by clicking the button at right of this values. A new modal window will appear and you only have to press button 'new code'
Keep in mind that previous installations will remain in the Windows registry and you should uninstall them. This is only in case you have same GUID for different VS setup due to a mistake (for example using a setup template)
If you select setup file in Solution Explorer and press F4 you will get properties of Setup file.
Set property "DetectNewerVersion" as false and Reinstall
Best of Luck

passing msiexec command line params to a child process started by msiexec

I have a requirement to update config files with the command line provided arguments for some reason, the file is not being updated so I wrote a small utility app in c# to be started by msiexec. The intention is to get the commandline params to this app so that it would open the config file and update it during the course of installation.
My app was executed fine but when trying to read the parent process (msiexec) command line params, I get something like C:\windows\msiexec /V not the ones I specify on the msiexec command line (I'm not even using /V)
Any ideas about what could be the issue? If you have a better way to handle this please suggest.
Thanks.
Update:
Sorry for the confusion, I was using WiX installer and I start the WiX generated .msi on the command line as below for eg.
C:\> msiexec /I foo.msi ARG1="v1" ARG2="v2"
ARG1 and ARG2 are defined in Wix installer script.
What I'm looking at is a way to access the command line params ARG1="v1", ARG2="V" by a small application which will be started by msiexec (the app is specified in Wix installer script as custom action).
Ideally, when I use xmlFile (tried xmlConfig as well), my WiX installer script should be able to update my config files with v1, v2 but its not happening so wrote an application that should be able to read v1 & v2 and write to the config file.
using xmlFile I get the following error:
ExecXmlFile: Error 0x8007006e: failed to load XML file: Error 25531. Failed to open XML file , system error: -2147024786 MSI (s) (E4!54) [18:11:36:714]: Product: -- Error 25531. Failed to open XML file , system error: -2147024786 –
Doesn't get any meaningful info. I used the msiexec argument /l*v to generate the logging.
Log excerpt:
Actually xmlFile should do my requirement but I get the following error while using it. Any help on this would be greatly appreciated.
MSI (s) (E4:00) [18:11:32:110]: Executing op: ActionStart(Name=ExecXmlFile,,) Action 18:11:32: ExecXmlFile.
MSI (s) (E4:00) [18:11:32:111]: Executing op: CustomActionSchedule(Action=ExecXmlFile,ActionType=3073,Source=BinaryData,Target=ExecXmlFile,CustomActionData=1030//cloudRecognition/connectiontype130//cloudRecognition/connectionaddress192.168.128.59;192.168.128.261030//cloudRecognition/connectionport50001;50001)
MSI (s) (E4:DC) [18:11:32:113]: Invoking remote custom action. DLL: C:\Windows\Installer\MSIA419.tmp, Entrypoint: ExecXmlFile
MSI (s) (E4:EC) [18:11:32:113]: Generating random cookie.
MSI (s) (E4:EC) [18:11:32:115]: Created Custom Action Server with PID 10104 (0x2778).
MSI (s) (E4:68) [18:11:32:402]: Running as a service.
MSI (s) (E4:68) [18:11:32:403]: Hello, I'm your 32bit Elevated custom action server.
ExecXmlFile: Error 0x8007006e: failed to load XML file:
Error 25531. Failed to open XML file , system error: -2147024786
MSI (s) (E4!54) [18:11:36:714]: Product: -- Error 25531. Failed to open XML file , system error: -2147024786
CustomAction ExecXmlFile returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Are you passing the arguments as MSI properties? If yes, then you can read them from the MSI database. Check this:
http://www.alteridem.net/2008/05/20/read-properties-from-an-msi-file/
I am guessing you are setting environment specific application properties to the Config file? If so, why don't you have all the properties defined in the config file and make the application smart enough to read the right properties (by checking the environment)? I would do that.
Above comments are just based on the limited information you provided. You would have your own reasons to do so :)
It seems to me that you need to add a CustomAction to your install process.
You might need both or just one, depending of the request that you have.
To Update Configuration files can you use XmlFile CustomAction, to change modify any XML file.
To launch a Quiet Execution CustomAction
I believe that this will allow you to change the values of the configuration file during the installation. You can find a nice introduction to CustomActions and their types here. Have a look at the type 2 CustomAction.
 
Edit for follow question in Answer section:
When is the CA scheduled to launch during the installation process?
Do you have a log file for the install?
 
Re-edit
Without Code or more information about the installation process, I can't really help more.
Helpfull info would be:
Where in the installation sequence is your CA launched?
What WiX Element are you using to change the values in your file.
Did you try to create an installer that does just the part that you are having trouble with, to isolate the behavior.

Resources