Jump to content

winnt.sif DetachedProgram ?


Recommended Posts

Reading through the ref.chm file, I found this interesting section regarding DetachedProgram execution via [GuiUnattended] section of winnt.sif

I'm going to play around with this on the weekend, but perhaps someone already knows?

DetachedProgram = "%SYSTEMDRIVE%\install\wpi.cmd"

wpi.cmd

@start %systemdrive%\install\wpi\WPI.hta

If I am guessing correctly, this will execute my WPI installer, and run it OVER THE TOP of the installation program? As in, WPI comes up on the screen at first GUI Mode run time and setup is still running in the background?

If this is correct, my cmdlines.txt could run the WPI generated install.cmd? Theoretically, if WPI ran at the start of GUI mode setup, as long as you didn't leave it on the screen for half an hour it would be well and truly finished by the time cmdlines.txt was run?

Link to comment
Share on other sites


Functionality is very limited at the T-39 minute stage where DetachedProgram is executed. .cmd files will not work.

Some people use this to extract a compressed rar sfx archive so they can copy the drivers to the HDD before the Detecting Hardware phase.

I wouldn't recommend installing applications at this time.

Link to comment
Share on other sites

.cmd files work, because I made my DetachedProgram = "%systemdrive%\install\wpi.cmd"

WPI.CMD:

start %systemdrive%\install\wpi\wpi.hta

and that executed. At T-39 minute, it brought up an "Open With" dialog box, asking which program I would like to use to execute wpi.hta, but Microsoft Application Host wasn't in the list (and obviously no registry entries to set .hta files as applications).... At first I stuffed around adding the required registry keys to the hive files, but I couldn't get the syntax correct, so then I stuffed around with a batch file that would add the required registry settings, something like this:

WPI.CMD

@echo offif %systemdrive% == C: goto :c_driveif %systemdrive% == D: goto _drivegoto :error:c_drivereg /import %systemdrive%\install\imports\import-c.reggoto :end_drivereg /import %systemdrive%\install\imports\import-d.reggoto :end:errorecho Must have been too lazy to add more drives. %systemdrive% is not supported.goto :veryend:endstart %systemdrive%\install\wpi\wpi.hta:veryend

i dumped mshta.exe and reg.exe in my $$\system32 folder.... for the import-c.reg, import-d.reg etc, I went into regedit and searched for all ".hta", "htafile" and "mshta.exe" references I could find and exported what looked like the correct stuff, I just changed the drive letter for each of the registry files... however, this didn't fix the problem....

in the end it didn't work, but i felt i was getting close... several times the command prompt window would stay up on the screen but the .hta file would not execute...

Link to comment
Share on other sites

i can tell you that pause definitely doesnt work.... i was doing similar to you to see what worked...

try one that does this

start mshta wpi.hta

and you get a CMD window stay on the screen until you close it off, with the Title being "mshta wpi.hta" :) it just sits there forever :rolleyes:

Link to comment
Share on other sites

I've tried to pack my Install and Driver folders, worked perfect when running Windows, but in Setup it didn't work at all...

WinRAR_SFX_archive.exe /S

works in Windows

but not in setup...

But Prahatpml (sorry it isn't correct, but your name is that difficult, you know??) told me it IS possible when you'd use 7ZIP... Try it, I'd say...

Link to comment
Share on other sites

I'm using a 7zip autoextract file to unpack my drivers to the systemdrive @ T-39.

[GuiUnattended]

    ...

    DetachedProgram="%systemdrive%\drivers\drivers.exe"

    Arguments="-y /q /r:n"

    ...

drivers.exe is situated in <cdrom>\$OEM$\$1\drivers

post-70-1082410104_thumb.jpg

post-70-1082410104_thumb.jpg

Link to comment
Share on other sites

big_gie is correct...

you cannot set your DetachedProgram="program switch"

it has to be

DetachedProgram="program.exe"

Arguments="switch"

so yours would look like:

[GuiUnattended]    DetachedProgram="WinRAR_SFX_archive.exe"    Arguments="/S"
Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

tried it on my winnt.sif. placed the following code in it:

[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=215
OemSkipWelcome=1
DetachedProgram="%systemdrive%\drivers\drivers.exe"
Arguments="/S"

but it didn't worked as mentioned.

btw, my cd (G:\$OEM$\$1\Drivers) contained the drivers.exe RAR-SFX compressed archive. i wonder what part have i missed or its just winrar sfx doesn't work in this scenario?

Link to comment
Share on other sites

tried it on my winnt.sif. placed the following code in it:

[GuiUnattended]
AdminPassword=*
EncryptedAdminPassword=NO
OEMSkipRegional=1
TimeZone=215
OemSkipWelcome=1
DetachedProgram="%systemdrive%\drivers\drivers.exe"
Arguments="/S"

but it didn't worked as mentioned.

btw, my cd (G:\$OEM$\$1\Drivers) contained the drivers.exe RAR-SFX compressed archive. i wonder what part have i missed or its just winrar sfx doesn't work in this scenario?

You're calling it wrong. Call it with the same syntax as cmdlines.txt.

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