Jump to content

Fresh installation of XP does not have the .hta files association


Recommended Posts

I just realized that my post is somehow out of topic. It might fit better in the User contributed forums, the WPI. But anyhow, this is more of a file association problem.

I am sure this is just a simple thing, but forgive me, I just cannot see it!

So, here we go:

Unattended setup of Windows XP PRO (slipstreamed with SP2), goes all the way through the [GuiRunOnce], runs the script "runhta.cmd" but the wpi.HTA file does not pop up, even though the MSHTA process is running. So i figured maybe i can use REGEDIT to get the file association done, but it's not working! I've lost my calm so maybe that's why i don't see the problem.

runhta.cmd:

set DATA="HTML Application"
REG ADD HKLM\SOFTWARE\Classes\htafile /v "" /t REG_SZ /d %DATA% /f
set DATA="%WINDIR%\system32\mshta.exe,1"
REG ADD HKLM\SOFTWARE\Classes\htafile\DefaultIcon /v "" /t REG_SZ /d %DATA% /f
set DATA="%WINDIR%\system32\mshta.exe %%1 %%*"
REG ADD HKLM\SOFTWARE\Classes\htafile\Shell\Open\Command /v "" /t REG_SZ /d %DATA% /f
set DATA=

REM Looking for the installation drive letter...
for %%i in (C D E F G H I J K L M N O P Q R S T U V W X Y Z) do if exist %%i:\here.yes set wpipath="%%i:\wpi\"
echo The path has been set as %wpipath%
echo.
echo Running the wpi.hta...

REM Special registry tweak needed.
regedit /s %wpipath%common\wpi.reg

REM Make WPI directory the current directory.
cd /d "%wpipath%"

echo.
start mshta wpi.hta
echo.

REM Undo registry tweak.
regedit /s %wpipath%common\undo.reg

REM Cleaning up the desktop.
rem del /s/q "%userprofile%\desktop\*.lnk"

REM Rebooting the sytem to finalize the installation process.
REM shutdown.exe -r -f -t 30 -c "To finish installations WPI will now reboot in 30 sec..."

exit

I thought maybe i disabled something in the [Components] section of WINNT.SIF, but i don't see anything; do you?

winnt.sif:

[Components]
AccessOpt = Off
Chat = Off
Dialer = Off
Hearts = Off
Indexsrv_system = Off
Media_utopia = Off
Mousepoint = Off
Msnexplr = Off
Pinball = Off
Solitaire = Off
Templates = Off
Zonegames = Off

Edited by zbeniamin
Link to comment
Share on other sites


Have you splistreamed hotfixes too ? Try to remove KB912945 if you have it, it break unattended install. Or re-download it, Microsoft has revised /integrate switch. http://www.msfn.org/board/index.php?showtopic=31886&st=1240#

Mine windows xp sp2 (without any updates/hotfixes) runs .hta without problem.

I don't know but perhaps you can't run .hta at GuiRunOnce, try to run @RunOnceEx ...

edit: I have just re-read your post you have

echo.
start mshta wpi.hta
echo.

"start /w wpi.hta" is enough.

Link to comment
Share on other sites

edit: I have just re-read your post you have
echo.
start mshta wpi.hta
echo.

"start /w wpi.hta" is enough.

I haven't got KB912945. I use SVCPACK method to include hotfixes.

I am not having problems with the code starting the wpi.hta, I'm having a problem with Windows Xp PRO SP2 which does not open any HTA file. It's just like having a non existant extension that windows doesn't know of.

In the BATCH file i included (runhta.cmd), at the "start mshta wpi.hta" point, it can just be "wpi.hta" plain and simple and it gets open on a normal system. I don't know what else to do. I tried everyting i found on these forums, Xp pro advices forums, google searches and all... :huh:

It's definately something I did, because if I just setup windows XP from the same CD without using any unattended answer file, the HTA file association is just fine. :yes:

Link to comment
Share on other sites

Normally if you don't specify "/w" (or /wait ) switch post-commands will be executed directly without wait end of wpi. (it will reboot ...) I have always use "start /w wpi.hta" during five months ago without any problems.

Link to comment
Share on other sites

mritter, Sonic, thank you for your posts. However, I don't think I was able to state my problem correctly. My main problem was that i can't have WINDOWS open the HTA file. It has nothing to do with the starting command. I agree that /w means wait for the process to finish. But my problem is that my Windows XP does not open HTA files no matter what the command is. Not even double click in Windows Explorer.

Anyway, I called a friend of mine, he's a computer guy, and he doesn't know how to do that either... so i guess i'm going to give up on using WPI. Maybe some other method will do.

Thanks guys for your help. :thumbup

Link to comment
Share on other sites

  • 1 month later...
mritter, Sonic, thank you for your posts. However, I don't think I was able to state my problem correctly. My main problem was that i can't have WINDOWS open the HTA file. It has nothing to do with the starting command. I agree that /w means wait for the process to finish. But my problem is that my Windows XP does not open HTA files no matter what the command is. Not even double click in Windows Explorer.

I am getting the same problem, when it comes time to run the wpi.cmd file, the batch starts, but then comes up with an error that windows doesnt know what to do with a .hta file, just like trying to open (via double-clicking) an unknown file-type in windows normally. it doesnt know what to open the wpi.hta file with...

I tried a few different options off and on in my winnt.sif file, no changes at all.. very strange.. this is running in the [guirunonce] at the end of windows xp install..

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