faqts : Computers : Programming : Languages : Asp : ASP/VBScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

32 of 47 people (68%) answered Yes
Recently 7 of 10 people (70%) answered Yes


i tried to execute a exe file using code mentoned, it's running in back ground. i want in foreground

Jul 7th, 2003 03:08
Nagesh Rai, Manjunath Naik,

u can use the following javascript function to execute an exe with gui 
on the client system. for this code to work as intended u need to have 
activex controls enabled in the browser.
<script language="JavaScript">
	function LaunchExe(strPath, strCurrentDirectory) {
		var wshShell = new ActiveXObject("WScript.Shell");
		if (null != strCurrentDirectory) {
			wshShell.CurrentDirectory = strCurrentDirectory;
		wshShell.Run(strPath, 1, false);
		wshShell = null;
strPath: the full path of the exe
strCurrentDirectory(optional) : is the current directory
with best regards

© 1999-2004 Synop Pty Ltd