Jump to content

Recommended Posts

Posted

Hi guys! I really need your help ! ;)

I've just reinstall my computer using my brand new unnatended XP cd but I've a problem :s

When WPI launches for the first times, he ask me to choose a program to open WPI.hta :} (Before I reinstall, these was made automaticly)

So ok I choose %systemDrive%\windows\system32\mshta.exe to run it and everything is fine, th e program lauches and work perfectly.

But I'd like to auto make the file type association so I've written a little batch file wich is called before callaing the WPI.hta.

REM
REM Association de l'extension .HTA avec mshta.exe
REM
assoc .hta hta_auto_file
ftype hta_auto_file="%SystemRoot%\System32\mshta.exe" "%1"

Everithnig seems ok but when I check the entry stored typing

ftype hta_auto_file

it answers me :

hta_auto_file="D:\WINDOWS\System32\mshta.exe" ""

the %1 has dissapeard and so I can't open my file because %1 is the name of the opened file :s

Someone can help me ???

Thanks a lot !!

Geoffrey


Posted

Hi

Try with %%1 instead of %1

Alternatively, you can change the call til wpi.hta to something like this:

mshta.exe wpi.hta

That should work, since C:\Windows\system32 should be in your PATH.

Posted

Hi

I had the same problem once XP Service Pack 2 (sp2) was integrated, I got around it by altering the wpi.cmd file as follows; :w00t:

REM Start WPI and wait for its end

assoc .hta=hta_auto_file

ftype hta_auto_file="%SystemRoot%\System32\mshta.exe" "%%1"

start /wait WPI.hta

REM call any cleanup code here, or after this script.

exit

:end

This then works fine, seems that something with sp2 changes associations, as Internet Explorer doesnt automatically assign itself as the default browser either!

Cheers

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...