Jump to content

Silently associate .hta files with mshta.exe?


Recommended Posts

Thanks for moving it Kels!

Well, I've searched this forum left and right using the built-in search feature, and I got nothing. So, I went to trusty old google. Believe it or not, I found a link that referenced an MSFN thread from 2005 that describes this exact problem. Here is the link.

I am reinstalling Windows in VMWare as I type this. Hopefully this fixes the problem and reregisters .hta files with mshta.exe. I'll post the regfile here if it does, just in case anyone else wants to use WPI but doesn't want to install Internet Explorer.

Link to comment
Share on other sites


YEAH! It works!! So Internet Explorer can be removed in NLite, as long as you keep mshta.exe!

Here is the registry file you need to use to reregister .hta files with mshta.exe so that .hta files (like WPI.hta) will be autopened.

hta.reg

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.hta]
@="hta_auto_file"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\hta_auto_file\shell\open\command]
@="\"C:\\WINDOWS\\system32\\mshta.exe\" \"%1\""

If you want to implement this tweak, use cmdlines.txt to do so. This will run at T12-T13 during the reinstall, and ensure that WPI.hta will autopen with mshta.exe upon the next reboot.

Just to be complete, here are the entries you need to add to cmdlines.txt (assuming you are using the Tools Pack with WPI).

cmdlines.txt

 [COMMANDS]
"REGEDIT /S hta.reg"
"RunWPI.exe"

Thanks for your input guys. I'm glad this problem could finally be nailed down!

Edited by radigast
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...