Run WiseScript custom actions don't display dialogs during uninstall
|Article:TECH39954|||||Created: 2005-11-29|||||Updated: 2005-11-29|||||Article URL http://www.symantec.com/docs/TECH39954|
When installing, repairing or uninstalling an .MSI, "Run WiseScript" custom actions that include command-line options do not execute correctly.
Installing, repairing or uninstalling an .MSI using certain options (see the Resolution below for more information) adds "/s" to the command-line options for "Run WiseScript" custom actions, causing the command line to be different than expected.
The following situations insert "/s" at the beginning of the command-line options for "Run WiseScript" custom actions:
* Including the following command-line switches when executing msiexec.exe: /q, /qn, /qn+, /qb, /qb-, /qb+
* Repairing or uninstalling an application through the Add/Remove Programs applet in the Control Panel
* Repairing or uninstalling an application through the right-click (context) menu of the .MSI
To resolve this issue, add code to your wisescript that is being called in the .MSI installation to remove the /s switch from the command line (the WiseScript still executes silently):
1. Drag the If Statement script action to the top of the WiseScript. The If Statement Settings dialog appears.
2. Complete the fields on the If Statement Settings dialog as follows:
* If Variable: CMDLINE
* Condition (unlabeled): Contains
* The Value: /s
3. Click OK to close the If Statement Settings dialog.
4. Drag the Parse String script action below the If Statement script action. The Parse String dialog appears.
5. Complete the fields on the Parse String dialog as follows:
* Source/Value: %CMDLINE%
* Pattern/Position: /s
* Destination Variable 1: JUNK
* Destination Variable 2: CMDLINE
* Operation: Split value at first occurrence of pattern
* Trim Spaces: mark this checkbox
6. Click OK to close the Parse String dialog.
7. Drag the End Statement script action below the Parse String script action.
8. Save and compile the WiseScript.
It may be necessary to re-compile the .MSI to refresh the WiseScript compiled within the installation.
Article URL http://www.symantec.com/docs/TECH39954