Help with closing cmd window after code has run

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

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 1 year and 2 weeks 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.
Locked
oobymach
Posts: 1
Last visit: Wed Mar 01, 2023 12:38 am

Help with closing cmd window after code has run

Post by oobymach »

Here's my code

set x=createobject("wscript.shell")
x.run "%comspec% /k ""C:\Users\Go\Desktop\Debug\PBO2 tuner Shortcut.lnk"""

Which works to run the shortcut with arguments intact but it leaves an open cmd window afterwards, adding exit and quit at the end produced errors running the script, any help is appreciated.
This topic is 1 year and 2 weeks 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.
Locked