Last post Jul 18, 2012 02:07 AM by Song-Tian - MSFT
Jul 17, 2012 07:56 AM|srikanth.kamuju|LINK
Below code is not working in IE 8 and above versions, I am using Windows 7 Operating System
var Scr = new ActiveXObject("Scripting.FileSystemObject");
var CTF = Scr.CreateTextFile("C:\\Gyan.txt", true);
can any one help me please
Thanks in Advance
Jul 17, 2012 09:51 AM|prasad_jadhav|LINK
IE8 internet setting is more secure, to it doesn't allow activex objects.
If you have to run this, goto Tools->Internet Options-> Security->Custom Level->choose enable or prompt activex.
try Custom Level -> ActiveX controls and plug-ins -> Initialize and script ActiveX controls not marked as safe for scripting
Hope it helps.
Jul 18, 2012 02:07 AM|Song-Tian - MSFT|LINK
To launch an application on the client machine, place this script in the head of the HTML page.
var shell = new ActiveXObject("WScript.shell");
shell.run("notepad.exe", 1, True);
Only IE has support for ActiveX, so this won't work in any other browser. The user must answer "YES" to a warning that the page is trying to execute ActiveX code.
Additionally, the ws.Exec command is available only in Windows Script Host 5.6 which is standard in Win 2k and XP, but not in earlier versions.
Alternatively, if you use for example,
location.href = "C:\\Program Files\\Adobe\\Photoshop 6.0\\Photoshp.exe";
the browser will give a file-download dialog to which the user must choose "Open".