顯示具有 ActiveX 標籤的文章。 顯示所有文章
顯示具有 ActiveX 標籤的文章。 顯示所有文章

2017年8月4日 星期五

用 ActiveX 從 browser 開新視窗

-----------------------------
<script type="text/javascript" language="javascript">

        function RunFile() {

        WshShell = new ActiveXObject("WScript.Shell");

        WshShell.Run("c:/windows/explorer.exe ftp://support.localdomain.au/isd-bbs", 1, false);

        }

    </script>


<p><IMG SRC="image-sign.gif" HEIGHT=30 WIDTH=30 ALIGN=ABSCENTER><b><font face="Verdana, Arial, Helvetica"><font size=-1><a href="input type="button" value="Run File Explorer" onclick="RunFile();" onMouseOver = "window.status='For any downloading problem contact Kiran on 55231 or Call Call-Centre 58877    !!'; return true;" onMouseOut = "window.status=' '; return true;"> Win10-Download </a></font></font></b></p>
The ActiveX control has to be enabled. It will prompt for ActiveX control. I have disabled it with the following switches in Internet Options ==> Security ==>Local Intranet ==> Custom Level
i. Automatic prompting for ActriveX controls - disable
ii. Initialize and script ActiveX controls not marked as safe for scripting - enable

----------------------------
以下的方式未確認是否OK

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOTftp]
Source Filter={E436EBB6-524F-11CE-9F53-0020AF0BA770}
ShellFolder={63da6ec0-2e98-11cf-8d82-444553540000}
@=URLFile Transfer Protocol
AppUserModelID=Microsoft.InternetExplorer.Default
EditFlags=dword00000002
URL Protocol=
FriendlyTypeName=@CWindowsSystem32ieframe.dll,-905
[HKEY_CLASSES_ROOTftpDefaultIcon]
@=CWindowsSystem32url.dll,0
[HKEY_CLASSES_ROOTftpshell]
[HKEY_CLASSES_ROOTftpshellopen]
[HKEY_CLASSES_ROOTftpshellopencommand]
@=CProgram Files (x86)Internet Exploreriexplore.exe %1
[HKEY_CLASSES_ROOTftpshellopenddeexec]
@=hex(2)22,00,25,00,31,00,22,00,2c,00,2c,00,2d,00,31,00,2c,00,30,00,2c,00,2c,
00,2c,00,2c,00,00,00
NoActivateHandler=
[HKEY_CLASSES_ROOTftpshellopenddeexecApplication]
@=IExplore
[HKEY_CLASSES_ROOTftpshellopenddeexecIfExec]
@=
[HKEY_CLASSES_ROOTftpshellopenddeexecTopic]
@=WWW_OpenURL