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?

8 of 12 people (67%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Is it possible to invoke Exe which is in the client system from program? Exe need to show GUI.

Jul 7th, 2003 03:09
Nagesh Rai, ramesh totakoori,


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;
	}
</script>
here:
strPath: the full path of the exe
strCurrentDirectory(optional) : is the current directory
with best regards
nagesh
http://www.cenvo.com



© 1999-2004 Synop Pty Ltd