Start windows application via WScript.Shell JScript
Posted on 2011-02-15
I have a problem with launching an application from JScript. The software that I'm launching depends on certain libraries that are located in a folder where the program resides. Let's say that I've installed my program to C:\Program Files\MyProgram
If I were to do: Start | Run | "C:\Program Files\MyProgram\MyProgram", my app would crash since it cannot load libraries that are found in C:\Program Files\MyProgram.
Unfortunately, changing application's code to dynamically find it's startup path is out of the question.
Could you please help me start my application via WScript.Shell?
Here's what I have so far:
var wsShell = Sys.OleObject("WScript.Shell");