- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: using VBScript in custom action binary table problem
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
using VBScript in custom action binary table problem
Hi,
I got this info from Revenera support:
Create a new VBscript .vbs file with the following contents:
Set WshShell = CreateObject("WScript.Shell")
' Uninstall MSI
WshShell.Run "msiexec /x {PRODUCTCODE} /qn",1,true
Replace PRODUCTCODE the ProductCode GUID of the package you want to uninstall - it will be alpha-numeric in this format: {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}
1. Go to your projects "Custom Actions and Sequences" view
2. Right Click Custom Actions and select "New VBScript" > Stored in Binary Table
3. VBScript File Name = Point to the .vbs file you created
4. Install UI Sequence = After MigrateFeatureStates
5. Install UI Sequence > Install UI Condition = "1=1" This condition means that it will always run.
6. Under MEDIA > Releases view Setup.exe tab, Change "Required Execution Level" to "Administrator" This makes sure that the custom is launching with administrator permissions to allow the uninstall.
but when I run my installer I get an error:
image attached
Hi @lshadmi,
Thank you for your post.
Could you please clarify the project type of the project that you're running the VBScript custom action from? A Basic MSI project? An InstallScript MSI project? Or an InstallScript project?
The project type should be indicated in square brackets on the InstallShield title bar when your affected project is open: [<Project Type>]
Please let us know if you have any questions or concerns. Thanks!
השג את Outlook עבור Android
Lee ShadmiSr. Software Engineer
Emaillshadmi@acuant.com
Acuant, Inc. Internet E-mail Confidentiality Disclaimer: This email (and any attachments) is only intended for use by the person or entity to which it is addressed and may contain information that is privileged and/or confidential. You, the recipient, are obligated to maintain it in a safe, secure and confidential manner. Unauthorized disclosure by you or failure to maintain confidentiality may subject you to legal penalties. If you are not the intended recipient, please immediately notify us by return email and delete this message from your computer. Furthermore, any retention, dissemination, distribution or copying of this communication is strictly prohibited.
Could you please try to add this customaction to some button in the dialog, for ex: In installwelcome dialog NEXT button add this action and then try it works or not,
It might be due to 2 msiexec wont run at a same time, so try the above use and check it works or not