Internet Code Download linking (AS PER MSDN)
In this complicated alternative, the Web page bypasses the ordinary File Download process by utilizing Internet Code Download. Internet Code Download is the Internet Explorer feature that allows Web pages to automatically download ActiveX controls and other native code objects. Files obtained through Internet Code Download pass through the ActiveX security framework, which is controllable by security options.
1.If the "executable file" is not a signable PE (.exe) such as a .bat file, then the file must be packaged in a .cab file with an INF in the following form.
**
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
file.zzz=file.zzz
[file.zzz]
clsid={15589FA1-C456-11CE-BF01-00AA0055595A}
FileVersion=1,0,0,0
hook=zzzinstaller
[zzzinstaller]
run=%EXTRACT_DIR%\file.zzz
**
Replace the instance of File.zzz above with the executable file to be run.
For more information about how to package the .cab file, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn.microsoft.com/en-us/library/aa741200(VS.85).aspx (http://msdn.microsoft.com/en-us/library/aa741200(VS.85).aspx) 2.Ensure that the .exe (or .cab) is code-signed. If the .exe has not been signed, this can be done using the CryptoAPI Authenticode Code Signing tools. Refer to the CryptoAPI documentation in the MSDN Platform SDK under the "Security" heading for more information.
For security reasons, the process of signing code for an organization is best handled by a central authority that is trusted by the entire organization. Code signing requires either the purchase of costly certificates from external vendors such as VeriSign or the maintenance of a certificate server such as Microsoft Certificate Server on the intranet.
3.Use this example page as a guideline for the link and script necessary to launch the signed code without prompt:
<HTML><HEAD><TITLE>Page of executable links</TITLE></HEAD>
<BODY>
<BR/>
<!-- hyperlink uses central script function called linkit() -->
<A HREF="" onclick="return linkit('signed-testfile.exe');">
SIGNED-CLOCK.EXE</A>
<SCRIPT>
// linkit puts filename into HTML content and spews it into iframe
function linkit(filename)
{
strpagestart = "<HTML><HEAD></HEAD><BODY><OBJECT CLASSID=" +
"'CLSID:15589FA1-C456-11CE-BF01-00AA0055595A' CODEBASE='";
strpageend = "'></OBJECT></BODY></HTML>";
runnerwin.document.open();
runnerwin.document.write(strpagestart + filename + strpageend);
window.status = "Done.";
return false; // stop hyperlink and stay on this page
}
</SCRIPT>
<!-- hidden iframe used for inserting html content -->
<IFRAME ID=runnerwin WIDTH=0 HEIGHT=0 SRC="about:blank"></IFRAME><BR/>
</BODY></HTML>
The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.