javascript initiating a .bat file on client

admin

Administrator
Staff member
i have been trying to run a bat file from a web page.

function executeCommands(inputparms)
{
var oShell = new ActiveXObject("Shell.Application");
var commandtoRun = "c:\\vbstest1\\testapp1\\render.bat";
var holdit = oShell.shellExecute(commandtoRun,"" ,"open", "1");
}

I've basically copied this code from some help sites, but can't seem to find any clear explaination on how to use the Shell object. The shellExecute statement is not working.

Is this the correct methodology to use to kick off a bat file via javascript? How can I debug the statement that fails? Any info oh the Shell object with javascript? My searches on the subject haven't turned up anything complete enough to help me. Thanks
 
Top