I’m trying to create a script to run all the tools I use working in a particular project (dor instance, gulp, phpstorm, php server, etc.)
I’d like to run shortcuts but not executable files. I can see two possible ways to achieve it in Windows:
- VbScript
- cmd.exe
Unfortunately, I’ve failed both:
1) WshShell fire .lnk file and I can't find an alternative way to do that:
To do so I’m trying to write .cmd file or .vbs However, I’ve got the problem in each way.
Dim WshShell
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "notepad.exe" ' Works alright
WshShell.Run "C:\Users\eugene\Desktop\gulp EngMe.lnk" ' got an Exception: Unknown Exception
2) .cmd script waits for closing previously started app:
@rem urls and filesystem shortcuts start alright:
"C:\Users\eugene\Desktop\8000.url"
"C:\Users\eugene\Desktop\project_folder.lnk"
@rem the following two commands are starting sequentially, when the previous one has closed.
"notepad.exe"
@rem shortcut to %windir%\system32\notepad.exe:
"C:\Users\eugene\Desktop\Notepad_.lnk"
What I'm doing wrong and is there another way to do what I'm trying?