cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Mayank23
Level 4

Issue while Running an Exe using CA.

I am trying to Run an exe using Custom Actions
I have copied my exe file + the files it refers to in it's root directory while running, in the Common Files Folder

But on Installing It gives the following error -

"Error 1721.There is a problem with this Windows Installer package.A program required for this install to complete could not be run. Contact your support personnel or package vendor"

But when I am using some standalone exe file like "Notepad.exe" It works perfectly fine..

There is no problem in my exe file and it runs perfectly fine when I manually do it by double clicking it.

Can you please help me Regarding this Issue?

😞
Labels (1)
0 Kudos
(6) Replies
RobertDickau
Flexera Alumni

What are the custom action's settings?
0 Kudos
Mayank23
Level 4

Action Type

Type : Launch an executable

Location : Installed with the product


Action Parameters

Source : I browsed and selected the exe contained in the Common Files Folder

Target : I have kept this Field blank as there are no parameters to be passed to my exe .

Additional Options

Return Processing : Synchronous (check exit code)

Respond Options

In-Script Execution : Immediate Execution

Execution Scheduling : Always execute

Insert into Sequence

Install UI Sequence :After ExecuteAction

Install Execute Sequence :
0 Kudos
cbragg
Level 7

You'll probably find that the executable has been written badly (apologies if it was you :rolleyes:) Coding best practice is that when an application exits successfully it should return an exit code of 0. You obviously know how to run an exe custom action if you got notepad to launch ok. You will probably find that your custom action is authored ok and your custom action is running ok too but because the application is returning something other than 0 for a success then installer presumes an error has happened. To get around this all you can really do (short of asking for a rewrite of the code if possible) is change your custom action from Synchronous (check exit code) to Synchronous (ignores exit code). The problem to be aware of with this though is that if it really does fail, your installation will continue on blindly. If you have some reg key or file to test afterwards to check it ran ok then you might want to consider doing that too.

Oh and ps. If you exe makes changes to your machine its good practice to run it in deferred mode, you have yours set to immediate.
0 Kudos
Dan_Galender
Level 10

You might also check to see that your executable has no missing dependencies.
0 Kudos
amarold
Level 5

Mayank23 wrote:

Respond Options

In-Script Execution : Immediate Execution

Execution Scheduling : Always execute


If you're trying to run an executable being delivered by your installer, you need to run as a deferred execution. Immediate runs as soon as the installer is read in, but before any files are copied.
0 Kudos
Mayank23
Level 4

Thank you ..I have changed the Sychronus check exit code to Sychronus ignore exit code and the CA worked fine.. 😄
0 Kudos