Page 1 of 1

vbscript - How to open .lnk file or better known as a shortcut

Posted: Thu Mar 12, 2020 4:06 am
by Ldallial
I simply have this

set x=createobject("wscript.shell")
x.run %comspec% /k C:\Program Files (x86)\Keysticks.net\Keysticks\KeySticks.lnk"

but gives me return code... invalid character, code: 800A0480

I copy pasted the path... I must be missing something else

Re: vbscript - How to open .lnk file or better known as a shortcut

Posted: Thu Mar 12, 2020 4:18 am
by jvierra
You are missing a quote.

x.run "%comspec% /k ""%ProgramFiles(x86)%\Keysticks.net\Keysticks\KeySticks.lnk"""