Solved

Start windows application via WScript.Shell JScript

Posted on 2011-02-15
2
1,080 Views
Last Modified: 2012-05-11
Hello Experts!

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");
wsShell.Run('"C:\\Program Files\\MyApp\\MyApp.exe"');

Thanks.
0
Comment
Question by:dimaj
2 Comments
 
LVL 39

Accepted Solution

by:
Aaron Tomosky earned 500 total points
ID: 34903271
0
 
LVL 7

Author Comment

by:dimaj
ID: 34903368
Thank you VERY MUCH!!!

I've been looking for a solution to this for couple of hours now!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Bootstrap Form 16 38
alert on input text 2 23
Asp response.write to clients 6 34
Validating number not work with decimal 4 24
A short article about problems I had with the new location API and permissions in Marshmallow
This is about my first experience with programming Arduino.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question