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
Cutom Actions File for MSI - run vbs
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.
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.
- imessage357@gmail.com
- Posts: 14
- Last visit: Tue Nov 28, 2023 5:29 pm
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Cutom Actions File for MSI - run vbs
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.
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.
SAPIEN Technologies, Inc.