Forum Discussion
- tristaanogreEsteemed ContributorYou might want to try creating an instance of the WScript.Shell OleObject and operate against that.
See the following information for how to use that object.
http://msdn.microsoft.com/en-us/library/aew9yb99(v=vs.85).aspx - makh_dvOccasional ContributorIf your project is related to .Net one.
A quick solution could be:
Add to Project by Double click on it -> Properties -> CLR Bridge: System 2.0 from GAC. This will allow to use common dotNet assemblies
use following code (JScript):
var process = dotNET.System_Diagnostics.Process.Start_2(path);
// OR var process = dotNET.System_Diagnostics.Process.Start_3(path, args);
process.WaitForExit(); //infinite wait
// OR process.WaitForExit_2(msecs);
You can read more about Process object here:
http://msdn.microsoft.com/en-us/library/system.diagnostics.process_members%28v=vs.90%29.aspx
Note: JScript doesn't support method overloading, thus you'll need to check with IntellSense suffixes (like above _2, _3 etc) meanings. - InokOccasional ContributorHi
The .Net solution workes fine in JScript but not under vbscript. In vbscript I can start an application but can not wait till it's finished.
The Method WaitForExit is not available in vbscript.
My problem now I have existing projects in vbscript and as far as I know I can't mix them. Is there a way that I don't have to convert my existing vbscripts?
Thanks. - YMinaevStaffHi,
The Method WaitForExit is not available in vbscript.
We've received your submitted support case. The problem was in your code, not in functionality of scripting languages. Also, a situation where the list of methods supported by .NET assembly will be different depending on the language you access it from, is impossible.
Related Content
- 5 years ago
- 13 years ago
Recent Discussions
- 27 minutes ago
- 9 hours ago