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 LICENSE NUMBERS, ACTIVATION 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.
This topic is 4 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
imessage357@gmail.com
Posts: 14
Last visit: Tue Nov 28, 2023 5:29 pm

Cutom Actions File for MSI - run vbs

Post by imessage357@gmail.com »

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 1053 times
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: Cutom Actions File for MSI - run vbs

Post by Alexander Riedel »

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.
This topic is 4 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.