cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Kevin_Hodgson
Level 5

Custom Actions not executing...

HI, hopefully someone can give me an idea of what's going on here.

I've got some InstallScript custom actions that need to modify/move files copied by the install, and one to execute an executable we install as part of our installation.

The InstallScript scripts are set up/exported as ExFn_xxxxcustomaction

The Custom Actions that execute them are sequenced after the InstallFiles action in the Install Execute Sequence and are configured as Deferred Execution Custom actions.

When I'm debugging, my Immediate Custom actions are debugged correctly, but all the actions set for Deferred Execution do not trigger the Script Debugger.

In the MSI Log, they simply say

MSI (s) (70:7C) [11:14:09:446]: Doing action: HandleLicenseFile
Action 11:14:09: HandleLicenseFile.
Action start 11:14:09: HandleLicenseFile.
HandleLicenseFile:
Action ended 11:14:09: HandleLicenseFile. Return value 1.

For each of the Custom Actions being called that fail to run.

The Immediate Execution Custom Actions that do run, have a full log of the script actions in the MSI Log.

If I enable the MSI Debugger in InstallShield, I get Errors indicating that ISSetup.dll is not present in the Temp Directory for each of the Deferred Execution actions that fail to run.
Labels (1)
0 Kudos
(4) Replies
DebbieL
Level 17

I think that KB Q112187 has a fix for that.
0 Kudos
Kevin_Hodgson
Level 5

DebbieL wrote:
I think that KB Q112187 has a fix for that.



Thanks Debbie, that's gotten me half way there.

I can now see what was going on. The Custom Actions were being executed, but I now realize that since they're set for Deferred Execution, the TARGETDIR property they all use is blank.

So I've created a Set Property Custom Action for each of the Deferred CA's I'm calling, to set the Property (same name as the Deferred Custom Action), to [TARGETDIR]

Unfortunately, during the execution of the Deferred Custom Actions, the CustomActionData property is set to F:\, not the TARGETDIR selected during Install UI Execution (%PROGRAMFILES%\AppName).

An example CA Property action is the following:
PropertyName: HandleLicenseFile
PropertyValue: [TARGETDIR]
Return Processing: Synchronous (Check Exit Code)
In-Script Execution: Immediate Execution
Execution Scheduling: Always Execute

I have it sequenced after InstallInitialize in the Install Execute Sequence.

Any idea why it's always F:\ (which happens to be the last physical HD on my system, but I suspect that's just a coincidence).
0 Kudos
DebbieL
Level 17

Do you mean INSTALLDIR instead of TARGETDIR? INSTALLDIR is used in Basic MSI and InstallScript MSI installations. TARGETDIR is used in InstallScript installations.
0 Kudos
Kevin_Hodgson
Level 5

DebbieL wrote:
Do you mean INSTALLDIR instead of TARGETDIR? INSTALLDIR is used in Basic MSI and InstallScript MSI installations. TARGETDIR is used in InstallScript installations.


You're absolutely right, I've been upgrading an older InstallScript project to a BasicMSI, so I still get the two properties mixed up sometimes.

Switching it to INSTALLDIR seems to have addressed my remaining issues.

Thanks for the help.
0 Kudos