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.
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.
Locked