

Type the following command at a command prompt: mshta.exe http://WebServer/HTARepro/Default. Make sure that you have enabled anonymous access to the contents of the HTARepro virtual directory. Place the two files, Default.hta and Main.htm, in a virtual directory that is named HTARepro on a Web server. Use Notepad to create a text file that is named Main.htm.Īdd the following HTML code to the Main.htm file: Use Notepad to create a text file that is named Default.hta.Īdd the following HTML code to the Default.hta file: In the Address box, type the path to the automatic configuration script. Make sure that none of the other check boxes are selected.

In the Local Area Network (LAN) settings dialog box, click to select the Use automatic configuration script check box. On the Connections tab, click LAN Settings. On the Tools menu, click Internet Options. Click to clear the Include all sites that bypass the proxy server check box in the Security settings of Internet Explorer.Make sure that another process has not locked the file, and wait to open the file until the other process releases it. Do not use the Location object in your code. To open a write-protected file, change the write-protection attribute of the file.Add the Web site that you are accessing to the Trusted zone or to the Restricted zone.Use a host name instead of a Fully Qualified Domain Name (FQDN) to access the path to the HTA.Hard code a proxy server in the Proxy server settings of Internet Explorer instead of using an automatic configuration script, and then press F5 to refresh the HTA in the browser.Therefore, the code and the file names in these methods may differ from your code and from your file names. The following methods are based on the sample that is mentioned in the Steps to reproduce the behavior section of this article.
