Cutom Actions File for MSI - run vbs

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
imessage357@gmail.com
Posts: 10
Joined: Tue Jun 18, 2013 8:39 am

Cutom Actions File for MSI - run vbs

Post by imessage357@gmail.com » Tue Oct 08, 2019 4:03 pm

My PS STUDIO STATS
Product, version and build:Powershell Studio 2019 , version : 5.6.165
32 or 64 bit version of product: 64 bit
Operating system:Windows 10 1903 64 bit Enterprise
32 or 64 bit OS:64

Is it possible to run a vbs file when using the Cutom Actions File when building an msi?

I am trying to supress the powershell box form poping up
Attachments
CustomAction.jpg
CustomAction.jpg (66.49 KiB) Viewed 179 times

User avatar
Alexander Riedel
Posts: 7049
Joined: Tue May 29, 2007 4:43 pm

Re: Cutom Actions File for MSI - run vbs

Post by Alexander Riedel » Wed Oct 09, 2019 10:33 am

The packager has a special provision for powershell files to generate the powershell.exe call needed.
For a VBS file you need to add that manually.
So what you would specify in file is
C:\Windows\System32\WScript.exe
Under arguments you specify your script file.

You want to use WScript instead of CScript, because I understand from your post that you do not want a console window to be visible.

Alternatively, if you want to use PowerShell but want the custom action to be silent, package the script you need to execute as a custom action with a silent powershell engine.
Then specify that exe file as a custom action.

Hope this helps.
Alexander Riedel
SAPIEN Technologies, Inc.