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

Debug InstallScript Custom Action Running Deferred In System Context.

Debug InstallScript Custom Action Running Deferred In System Context.

Summary

Information on how to debug deferred ca in system context

Synopsis

The InstallScript Debugger checks the value of the ISSCRIPTDEBUG property to determine whether to debug the InstallScript in an installation. However, deferred, commit, and rollback InstallScript custom actions cannot access this property (or most of the Windows Installer properties). Therefore, the InstallScript Debugger ignores deferred, commit, and rollback InstallScript custom actions.
This Knowledge Base article will show how you can debug these InstallScript custom actions, as well as custom actions running deferred in system context.

Discussion

In order to be able to use the InstallScript Debugger to debug deferred, commit, or rollback InstallScript custom actions, you will need to create a registry keys, based on the version of InstallShield you are using to build your setup.

You will want to use 'regedit.exe' to create the following registry key...

For InstallShield 2015:
HKEY_CURRENT_USER\Software\InstallShield\ISEngine22.0

For InstallShield 2014:
HKEY_CURRENT_USER\Software\InstallShield\ISEngine21.0

NOTE: For earlier versions of InstallShield you can reference Knowledge Base article Q112187, which is linked at the end of this article.

In addition, a DWORD value called DebugISCustomActions with data 00000001 should be created under the key. This value enables you to use the InstallScript Debugger to debug deferred, commit, and rollback InstallScript custom actions.

NOTE: Even without this registry change, you can use the InstallScript Debugger to debug immediate InstallScript custom actions. If you do apply this registry change, the InstallScript Debugger launches for all InstallScript custom actions, regardless of what you have set for the ISSCRIPTDEBUG property.

Workaround

So the above changes to the registry will allow you to debug your InstallScript custom action in deferred, commit or rollback mode. However if you try to debug a InstallScript custom action running deferred in system context, the action will be run but the debugger won't appear.

To fix this, you will have to make a modification to the registry by setting the debug registry key under a SYSTEM account. To do this, you can perform the following steps...
  • Launch a command prompt as SYSTEM using psexec. You can take a look at PsExec v2.11 for more information on this.
  • From that command prompt, run the command 'regedit' like so...
"C:\PSTools\psexec.exe" -i -d -s c:\windows\regedit.exe
  • In the Registry editor that opens, set the debug registry key/value...
HKEY_CURRENT_USER\Software\InstallShield\ISEngine22.0
DebugISCustomActions(REG_DWORD) set to 1.

Now run your installation in debug mode and the debugger will appear for your custom action.

Related KB Articles

Q112187
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jul 09, 2018 10:09 PM
Updated by: