Javascript Wscript.Shell command not working by clicking button in browser
I am using this code: to create new folder by clicking a button in browser,
function exer()
{
var wsr = WScript.CreateObject("WScript.Shell");
wsr.Exec("cmd /C mkdir C:\\users\\vakav\\Desktop\\VBSCRIPT_2013\\new");
}
<body>
<input type="button" value="test" onclick="exer()" />
</body>
Its not working but if i run the above function in a test.js file and run
the following commnad, its working: cmd> cscript.exe test.js Can anyone
help me please ?
No comments:
Post a Comment