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

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.

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.

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)

ActiveX component cant create object: Mercury.ObjectRepositoryUtil

I created a VB script that converts the Object Repository file (.tsr) of QTP to XML and then to Excel. This Excel file format is configured via the VB script as well. It works well however, I am trying to run this on a new machine and I get an error:
ActiveX component cant create object: Mercury.ObjectRepositoryUtil.
Script:
Public Function ExportTSRToXML(TSRPath,XMLPath)
Set XMLRepositoryObj = CreateObject("Mercury.ObjectRepositoryUtil")
XMLRepositoryObj.ExportToXML TSRPath, XMLPath
ExportTSRToXML = XMLPath
Set XMLRepositoryObj = Nothing
End Function
Here are my steps to fix this:
1. Registered RepositoryUtil.dll with REGSVR32
2.using CSCRIPT.exe under SYSWOW64 ran the vbscript file
At step 2 mentioned above, I see the error when the script is executed :
"Microsoft VBScript runtime error: invalid procedure call or argument"
What Am i missing? Cant figure it out.
Thank you for your help. Again, this code works completely fine on multiple machines. The new Machine (64bit) has Unified Functional tool 11.5 instead of QTP 11.0.
Try to start the script from command line with: %SystemRoot%\SysWow64\cscript <yourscript-here>.
The 64 bit machine automatically starts a 64 bit interpreter and this com object is not compatible with it

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.

How to update the InnoSetup Wizard GUI status text from PascalScript code during uninstall

During installation, it's possible to update the InnoSetup wizard status text from inside the PascalScript event handler "CurStepChanged(ssPostInstall)" with the following code (How to update the InnoSetup Wizard GUI status text from PascalScript code):
WizardForm.StatusLabel.Caption := 'status update';
This does not work for uninstall. Accessing this property from inside "CurUninstallStepChanged(usUninstall)" fails with the following error:
"Runtime Error: Line 526: Exception: Internal Error: An attempt was made to access WizardForm before it has been created."
Any idea how the InnoSetup wizard status text can be changed during uninstall? Maybe "usUninstall" is too early? But the label is already there and visible in the uninstaller's GUI...
I found the solution:
UninstallProgressForm.StatusLabel.Caption := 'status update';

Resources