MSFN Forum: winnt.sif DetachedProgram ? - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

winnt.sif DetachedProgram ? [GuiUnattended] DetachedProgram Rate Topic: -----

#1 User is offline   [BM]Crusher 

  • Got milk?
  • PipPipPipPip
  • Group: Members
  • Posts: 570
  • Joined: 05-April 04

Posted 16 April 2004 - 04:33 AM

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?


#2 User is offline   Aaron 

  • The MSFN Banana
  • Group: Patrons
  • Posts: 5,767
  • Joined: 17-August 01

Posted 16 April 2004 - 04:40 AM

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.

#3 User is offline   [BM]Crusher 

  • Got milk?
  • PipPipPipPip
  • Group: Members
  • Posts: 570
  • Joined: 05-April 04

Posted 16 April 2004 - 05:38 PM

.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 off
if %systemdrive% == C: goto :c_drive
if %systemdrive% == D: goto :d_drive
goto :error
:c_drive
reg /import %systemdrive%\install\imports\import-c.reg
goto :end
:d_drive
reg /import %systemdrive%\install\imports\import-d.reg
goto :end
:error
echo Must have been too lazy to add more drives. %systemdrive% is not supported.
goto :veryend
:end
start %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...

#4 User is offline   Aaron 

  • The MSFN Banana
  • Group: Patrons
  • Posts: 5,767
  • Joined: 17-August 01

Posted 16 April 2004 - 06:05 PM

How odd. I tried it myself a while back with just an ECHO This is [DetachedProgram] followed by a pause and exit, but it never appeared.

#5 User is offline   [BM]Crusher 

  • Got milk?
  • PipPipPipPip
  • Group: Members
  • Posts: 570
  • Joined: 05-April 04

Posted 16 April 2004 - 07:58 PM

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:

#6 User is offline   boran_blok 

  • Group: Members
  • Posts: 4
  • Joined: 14-April 04

Posted 17 April 2004 - 04:01 AM

hmmh, so this could be used for the $OEM$\ folders ?
because putting those inside an sfx would save some valuable megabytes from my CD

#7 User is offline   [BM]Crusher 

  • Got milk?
  • PipPipPipPip
  • Group: Members
  • Posts: 570
  • Joined: 05-April 04

Posted 19 April 2004 - 08:16 AM

you can run any .exe application i guess

#8 User is offline   Bâshrat the Sneaky 

  • aka Wim Leers
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,214
  • Joined: 29-October 03
  • OS:none specified
  • Country: Country Flag

Posted 19 April 2004 - 12:40 PM

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

#9 User is offline   big_gie 

  • Senior Member
  • PipPipPipPip
  • Group: Members
  • Posts: 617
  • Joined: 27-July 03

Posted 19 April 2004 - 03:28 PM

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

winnt.sif said:

[GuiUnattended]
    ...
    DetachedProgram="%systemdrive%\drivers\drivers.exe"
    Arguments="-y /q /r:n"
    ...


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

Attached File(s)

  • Attached File  7zip.JPG (34.58K)
    Number of downloads: 152


#10 User is offline   [BM]Crusher 

  • Got milk?
  • PipPipPipPip
  • Group: Members
  • Posts: 570
  • Joined: 05-April 04

Posted 20 April 2004 - 03:12 AM

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"


#11 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 06 May 2004 - 06:32 AM

It's also good to note that WinRAR SFX archives can be made to extract completely silently with no switches.

#12 User is offline   edmoncu 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 331
  • Joined: 28-April 04

Posted 17 May 2004 - 12:25 PM

im sorry guys if im slow to follow, does this simply mean i can have my $OEM$\drivers compressed and be extracted before the detecting hardware phase starts?

#13 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 17 May 2004 - 12:37 PM

Exactly

#14 User is offline   edmoncu 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 331
  • Joined: 28-April 04

Posted 18 May 2004 - 01:07 PM

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?

#15 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 18 May 2004 - 01:09 PM

edmoncu, on May 18 2004, 01:07 PM, said:

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.

#16 User is offline   edmoncu 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 331
  • Joined: 28-April 04

Posted 18 May 2004 - 01:38 PM

i realized, it worked.

but it did not decompressed at the HDD\Drivers folder as i expected, rather, it decompressed the files at the HDD\windows folder. i suppose, i should apply some advanced SFX rules with the drivers.exe file.

#17 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 18 May 2004 - 01:42 PM

edmoncu, on May 18 2004, 01:38 PM, said:

i realized, it worked.

but it did not decompressed at the HDD\Drivers folder as i expected, rather, it decompressed the files at the HDD\windows folder. i suppose, i should apply some advanced SFX rules with the drivers.exe file.

You need to specify the directory to extract to in the SFX settings. Look at the bottom of the third page of the pinned "Solved..." thread by Alanoll in the Drivers forum. I posted all the info for how to create the SFX archive which works for me.

#18 User is offline   edmoncu 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 331
  • Joined: 28-April 04

Posted 18 May 2004 - 02:11 PM

k, done it. thanks for the info :)
hmm, with the thread you gave me, it made me more curious to try that approach. :rolleyes:

#19 User is offline   RyanVM 

  • Like a big surly teddy bear.
  • PipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 2,661
  • Joined: 31-August 03

Posted 18 May 2004 - 02:17 PM

Haha. I recently converted my batch files over to run the stuff directly from the CD. Working like a charm so far and it certainly makes textmode setup go faster!

#20 User is offline   Alanoll 

  • CODE tags people, CODE tags!
  • Group: Patrons
  • Posts: 5,496
  • Joined: 25-September 03

Posted 18 May 2004 - 02:26 PM

oh yeah.....

people and there old ways of copying stuff from the CD.....
I think i ahve ONE file that's $OEM$ folders that gets copied. The rest are either programs to be isntalled, or were one or two files that I just added to txtsetup.sif and had XP copy them over.

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy