I am trying to launch some .exe files from the windows directory in HTML using activeX, here is the link http://msdn.microsoft.com/en-us/library/cc144191(VS.85).aspx
I know this might sound stupid or something, but I am going to open these HTML via C# web browser tool as it uses the IE engine.
It opens some of the .exe files from the link i provided up. for instance : C:\windows\system32\control.exe , but i try something more sensitive like c:\windows\system32\RecoveryDrive.exe , it simply does not works, i get an error.
Here is the HTML code I use. Thanks!
<body>
<p><h1>This is my web page</h1></p>
<button align="center" type=button onclick="ControlPanel();">Control Panel</button></p>
<button align="center" type=button onclick="RecoveryDrive();">MAGIC</button></p>
</body>
<script type="text/javascript" LANGUAGE="JavaScript">
function ControlPanel()
{
var ws = new ActiveXObject("WScript.Shell");
ws.Exec("c:\\windows\\system32\\control.exe");
}
</script>
<script type="text/javascript" LANGUAGE="JavaScript">
function RecoveryDrive()
{
var ws = new ActiveXObject("WScript.Shell");
ws.Exec("c:\\windows\\system32\\RecoveryDrive.exe");
}
</script>