WIX Custom Action Execution failed - visual-studio-2010

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)

Related

Wix Cab error code 1

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.

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

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

Web setup MSI fails on Windows Server 2008

I have built a web setup project in VS2008 which installs my ASP.NET/Silverlight app into IIS. This works fine everywhere except on Windows Server 2008.
I get this error message in the MSI installer log file:
MSI (c) (C8:D8) [15:02:21:067]: Invoking remote custom action. DLL: C:\Users\ADMINI~1\AppData\Local\Temp\1\MSIB7DD.tmp, Entrypoint: SetTARGETSITE
MSI (c) (C8!F0) [15:02:21:097]: Creating MSIHANDLE (14) of type 790531 for thread 2288
INFO : [08/27/2009 15:02:21:097] [SetTARGETSITE ]: Custom Action is starting...
INFO : [08/27/2009 15:02:21:107] [SetTARGETSITE ]: CoInitializeEx - COM initialization Apartment Threaded...
ERROR : [08/27/2009 15:02:21:107] [SetTARGETSITE ]: FAILED: -2147221164
ERROR : [08/27/2009 15:02:21:127] [SetTARGETSITE ]: Custom Action failed with code: '340'
INFO : [08/27/2009 15:02:21:137] [SetTARGETSITE ]: Custom Action completed with return code: '340'
MSI (c) (C8!F0) [15:02:21:137]: Closing MSIHANDLE (14) of type 790531 for thread 2288
MSI (c) (C8:D8) [15:02:21:137]: Closing MSIHANDLE (13) of type 790542 for thread 3040
Action ended 15:02:21: WEBCA_SetTARGETSITE. Return value 3.
MSI (c) (C8:E0) [15:02:21:147]: Doing action: FatalErrorForm
I've tried googling the various error codes, but I'm not having much luck.
What is the problem?
Like the comment, it looks like this could be something COM related. That would lead me to believe that the MSI is using something that is probably specific to IIS 6.
Make sure you have the IIS 6 compatibility options installed with IIS 7 in Windows 2008. That should install the COM components that your MSI is trying to access.
...just a guess of course. Good luck.
Web Setup projects (vdproj) require IIS 6 Management Compatibility to be installed on IIS 7 in order for the installer to work correctly. You only need the Metabase and WMI Compatibility options checked.
Here's a good link on the topic which describes the problem and how you can update the installer to require these options to be check for installation to continue: http://devio.wordpress.com/2011/04/26/pitfalls-installing-web-setup-msi-on-iis-7/

Why do I get a 1720 error when my InstallShield setup tries to run my VBS custom action?

The Custom Action is configured as follows:
Custom Action Name: MyCustomAction
VBScript Filename: <PathVar01>\MyFolder\MyVBSfile.vbs
ScriptFunction: MyFunction
Return Processing: Synchronous (Check exit code)
In-Script Execution: Immediate Execution
It is being executed via the following InstallScript code:
result = MsiDoAction(ISMSI_HANDLE,"MyCustomAction");
When the setup reaches that line in InstallScript, the installer shows an error alert, stating:
"Error 1720.There is a problem with
this Windows Installer package. A
script required for this install to
complete could not be run. Contact
your support personnel or package
vendor."
The result code returned by MsiDoAction is that of '1603', which, according to winerror.h, is:
//
// MessageId: ERROR_INSTALL_FAILURE
//
// MessageText:
//
// Fatal error during installation.
//
#define ERROR_INSTALL_FAILURE 1603L
Why is this happening? I was starting to doubt that the file was included properly. Yet, I am pointing to the correct file, and I've tried including the VBS via the InstallShield Support Files, thinking this would ensure the file was present with the setup, but same result.
Running the setup with logging enabled revealed the problem:
Action 13:29:19: MyCustomAction.
Action start 13:29:19: MyCustomAction.
Error 1720.There is a problem with
this Windows Installer package. A
script required for this install to
complete could not be run. Contact
your support personnel or package
vendor. Custom action MyCustomAction
script error -2146827278, Microsoft
VBScript compilation error: Expected
identifier Line 163, Column 37,
blnExample,)
To run a setup with logging enabled:
"C:\SetupFolder\setup.exe" /V"/l*v
c:\Install.log"
This forum thread was helpful.

Resources