You don't need %comspec% /k to launch a link with parameters or not
For example, this launches Notepad with a txt file :
set x=createobject("wscript.shell")
x.run "C:\Users\Christian\Desktop\TestNotepadLink.lnk ""e:\test.txt"""
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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.
You don't need %comspec% /k to launch a link with parameters or not
For example, this launches Notepad with a txt file :
set x=createobject("wscript.shell")
x.run "C:\Users\Christian\Desktop\TestNotepadLink.lnk ""e:\test.txt"""
Hi. Thank you for your question and reaching out. I’d be more than happy to help you with your query
You can try this command instead:
start /wait cmd.exe /c "my_command.bat"
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.
Double post