Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Installing Apps Using Runonceex

- - - - -

  • Please log in to reply
189 replies to this topic

#151
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • Joined 03-October 03
  • OS:none specified
  • Country: Country Flag
I was curious how guirunonce was run, i saw that it was run in runonce but i wanted to check for myself.

At about the 5-8 min mark runonce was run, then guirunonce was added to the runonce key.

This is what i had in my runonce key at 13 min mark:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce]"TS WMI tscfgwmi"="regsvr32.exe /s tscfgwmi.dll"
"BrandClearStubs"="RUNDLL32 IEDKCS32.DLL,BrandCleanInstallStubs MICROS"
"IE - 00"="rundll32.exe msnsspc.dll,SspcCreateSspiReg"
"IE - 01"="rundll32.exe msapsspc.dll,SspcCreateSspiReg"
"IE - 02"="C:\\WINDOWS\\System32\\mshta.exe /register"
"IE - 03"="fixmapi.exe"
"MDAC_InstODBCDrivers"="C:\\WINDOWS\\System32\\odbcconf @C:\\WINDOWS\\System32\\odbcconf.rsp"
"SchedulingAgent"="C:\\WINDOWS\\System32\\mstinit.exe /setup"
"RunOnceEx"="rundll32.exe C:\\WINDOWS\\System32\\iernonce.dll,RunOnceExProcess"
"TshootDLL_Reg"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\help\\TShoot.dll"
"SstubDLL_Reg"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\help\\sstub.dll"
"SniffpolDLL_Reg"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\help\\sniffpol.dll"
"OE_WMPDRM_Install_1"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\drmstor.dll"
"OE_WMPDRM_Install_2"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\drmclien.dll"
"OE_WMPDRM_Install_3"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\asfsipc.dll"
"OE_WMPDRM_Install_4"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\drmv2clt.dll"
"OE_WMPDRM_Install_5"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\blackbox.dll"
"OE_WMPDRM_Install_6"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\msnetobj.dll"
"OE_WMPMIndex_Install_1"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\msisam11.dll\""
"OE_WMPMIndex_Install_2"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\mindex.dll\""
"OE_WMPWMDM_Install_1"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\mswmdm.dll\""
"OE_WMPWMDM_Install_2"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\msscp.dll\""
"OE_WMPWMDM_Install_3"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\mspmsp.dll\""
"OE_WMPWMDM_Install_4"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmdmps.dll\""
"OE_WMPWMDM_Install_5"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmdmlog.dll\""
"OE_WMPWMDM_Install_6"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\cewmdm.dll\""
"OE_WMPWMDM_Install_7"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\mspmspsv.dll"
"OE_WMPWMFSDK_Install_1"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmstream.dll\""
"OE_WMPWMFSDK_Install_2"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmnetmgr.dll\""
"OE_WMPWMFSDK_Install_3"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmidx.ocx\""
"OE_WMPWMFSDK_Install_4"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmvdmod.dll\""
"OE_WMPWMFSDK_Install_5"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmvdmoe.dll\""
"OE_WMPWMFSDK_Install_6"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmadmod.dll\""
"OE_WMPWMFSDK_Install_7"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmadmoe.dll\""
"OE_WMPWMFSDK_Install_8"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\mpg4dmod.dll\""
"OE_WMPWMFSDK_Install_9"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmsdmod.dll\""
"OE_WMPWMFSDK_Install_10"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmsdmoe.dll\""
"OE_WMPWMFSDK_Install_11"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\laprxy.dll\""
"OE_WMPWMFSDK_Install_12"="\"C:\\WINDOWS\\System32\\logagent.exe\" /RegServer"
"OE_WMPWMFSDK_Install_13"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmvcore.dll\""
"OE_WMPWMPCodec_ivf"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\ivfsrc.ax\""
"OE_WMPWMPCodec_wmvax"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmvds32.ax\""
"OE_WMPWMPCodec_msscrnax"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\msscds32.ax\""
"OE_WMPWMPCodec_wmv8ax"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmv8ds32.ax\""
"OE_WMPWMPCodec_wmv8dmo"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\WINDOWS\\System32\\wmv8dmod.dll\""
"OE_WMPWMP6_Install_1"="C:\\WINDOWS\\INF\\unregmp2.exe /PreInstall"
"OE_WMPWMP6_Install_2"="C:\\WINDOWS\\INF\\unregmp2.exe /RegUniv"
"OE_WMPWMP6_Install_3"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\msdxm.ocx"
"OE_WMPWMP6_Install_4"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\dxmasf.dll"
"DelayedHscMui"="Cmd /c copy C:\\WINDOWS\\pchealth\\helpctr\\binaries\\hscmui.cab C:\\WINDOWS\\pchealth\\helpctr\\batch\\"
"DelayedHscUpdate"="Cmd /c copy C:\\WINDOWS\\pchealth\\helpctr\\binaries\\hscxpsp1.cab C:\\WINDOWS\\pchealth\\helpctr\\batch\\"
"OE_WMPWMP7_Install_0"="C:\\WINDOWS\\INF\\unregmp2.exe /MigrateLibrary"
"OE_WMPWMP7_Install_1"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\wmpcore.dll"
"OE_WMPWMP7_Install_2"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\wmpui.dll"
"OE_WMPWMP7_Install_3"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\wmp.ocx"
"OE_WMPWMP7_Install_4"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\drmclien.dll"
"OE_WMPWMP7_Install_5"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\drmstor.dll"
"OE_WMPWMP7_Install_6"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\asfsipc.dll"
"OE_WMPWMP7_Install_7"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\drmv2clt.dll"
"OE_WMPWMP7_Install_8"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\blackbox.dll"
"OE_WMPWMP7_Install_9"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\wmpcd.dll"
"OE_WMPWMP7_Install_10"="C:\\WINDOWS\\System32\\regsvr32 /s C:\\WINDOWS\\System32\\wmpshell.dll"
"OE_WMPWMP7_Install_12"="C:\\WINDOWS\\System32\\regsvr32 /s \"C:\\Program Files\\Windows Media Player\\wmpvis.dll\""
"OE_WMPWMP7_Install_13"="\"C:\\Program Files\\Windows Media Player\\wmplayer.exe\" /RegServer"
"OE_WMPWMP7_Install_20"="C:\\WINDOWS\\INF\\unregmp2.exe /Shortcuts /RegExts"
"GrpConv"="grpconv.exe -o"


At about 5-8 mins left this is what was in my runonce key:

Posted Image

As you can see, setup adds the comments in guirunonce to the runonce key before gui setup is done.

edit: ignore the last couple of lines i accidently merged my [shell] section with [guirunonce].

-gosh


How to remove advertisement from MSFN

#152
Bachus

Bachus

    Advanced Member

  • Member
  • PipPipPip
  • 408 posts
  • Joined 25-July 03
Something must be wrong then, Spooky, as my inf consistently runs after the first log-in. :)

#153
Marztabator

Marztabator

    Advanced Member

  • Member
  • PipPipPip
  • 481 posts
  • Joined 31-July 03
Could you show us your inf then, Bachus, to see what the rest of us might be missing?

#154
Spooky

Spooky

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 718 posts
  • Joined 12-November 03

Something must be wrong then, Spooky, as my inf consistently runs after the first log-in. :)

ok, lets look. Better yet you may have a unique situation that I myself have stumbled across,,,lets do this:

(this assumes that your using the moviemk.inf file, thats what i'm using and it runs at the 13 minute mark)

1. Open up your winnt.sif file.

2. Look for this (bear with me here) : [GuiRunOnce]

3. IF your using the moviemk.inf file and IF [GuiRunOnce] appears in your winnt.sif file and IF your moviemk.inf file contains lines like this:

IF these conditions exist then do this:

4. Remove [GuiRunOnce] (and if there is a command under it remove it too), from your winnt.sif file - you do not want any trace of [GuiRunOnce] in your winnt.sif file if your using moviemk.inf. And,,,heres why (I think).....

In some experimentation I had the same thing happen to me that you did. I was using moviemk.inf and it would not run at the 13 minute mark but would wait until I logged in. Drove me nuts. Then I happen to open up the winnt.sif file and I saw the [GuiRunOnce] . I didn't have any commands under it because I had previously deleted them in prep for having moviemk.inf install my stuff at the 13 minute mark but the [GuiRunOnce] was still there. I thought "what the heck..." and I deleted the [GuiRunOnce] section heading and saved the file, dumped it back into the I386 directory, made an ISO, and away I went to test. My apps started installing at the 13 minute mark, from the CD, using moviemk.inf just like I wanted them to. I thought WTH???? so I put the [GuiRunOnce] section heading back in the winnt.sif file and did another .iso and tested again, the apps did not install at the 13 minute mark but waited until I logged in. I removed the [GuiRunOnce] section heading and everything was good again with apps installing at the 13 minute mark like I wanted. Now i'm not sure why it did this, and this was the extent of my testing (thank God for VirtualPC) but what I think happened was that even with the [GuiRunOnce] section heading with no commands after it, when windows setup saw the 'HKLM,"%RunOnceEx%\...' RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx" in my moviemk.inf it may have said to its self "Hmmmmmm winnt.sif says [GuiRunOnce] but doesn't say what, so this must be what its talking about so lets run this at log in...". This is just my theory, I dont really know as i'm not an expert in these matters and i'm just relating to you a strange occurance from my own experiences. Heres what i'm running in moviemk.inf:

[Version]
Signature="$Windows NT$"

[SourceDisksNames]
1 = %cdname%,%cdtagfile%,,""

[DefaultInstall]
AddReg=install.apps

[Install.Apps]
HKLM,"%RunOnceEx%\",Title,0,"Installing Applications and Settings"
HKLM,"%RunOnceEx%\",Flags,0x00010001,20

HKLM,"%RunOnceEx%\install01",,,"DirectX 9.0b"
HKLM,"%RunOnceEx%\install01",1,,"%1%\APPS\DirectX9b\DX9NTopk.exe"

HKLM,"%RunOnceEx%\install02",,,".NET Framework v1.1"
HKLM,"%RunOnceEx%\install02",1,,"%1%\APPS\NetFrame\netfx.msi /qn"

HKLM,"%RunOnceEx%\install03",,,"Microsoft JavaVM 3810"
HKLM,"%RunOnceEx%\install03",1,,"%1%\APPS\JavaVM3810\msjavwu.exe /Q:A /R:N"

HKLM,"%RunOnceEx%\install04",,,"Movie Maker 2"
HKLM,"%RunOnceEx%\install04",1,,"%1%\APPS\MovieMaker\mm20.msi /qn"

HKLM,"%RunOnceEx%\install05",,,"Sygate Firewall Pro v 5.5"
HKLM,"%RunOnceEx%\install05",1,,"%1%\APPS\Sygate55pro\pspf1.exe /QB Reboot=Supress"

HKLM,"%RunOnceEx%\install06",,,"TweakUI"
HKLM,"%RunOnceEx%\install06",1,,"%1%\APPS\PowerToys\TweakUI.msi /qb"

HKLM,"%RunOnceEx%\install07",,,"WinRar"
HKLM,"%RunOnceEx%\install07",1,,"%1%\%APPS\WinRaR\wrar320_setup.exe /s"

HKLM,"%RunOnceEx%\install08",,,"AdobeReader 6"
HKLM,"%RunOnceEx%\install08",1,,"%1%\APPS\AdobeReader6\AR6.msi /QB"

HKLM,"%RunOnceEx%\install09",,,"Installing ASPI Layer"
HKLM,"%RunOnceEx%\install09",1,,"%1%\APPS\Aspi\inaspi.cmd"

HKLM,"%RunOnceEx%\install10",,,"Fireburner"
HKLM,"%RunOnceEx%\install10",1,,"%1%\APPS\Fireburner221\fb221we.exe /QB Reboot=Supress"

HKLM,"%RunOnceEx%\install11",,,"QuickTime Player Alternative"
HKLM,"%RunOnceEx%\install11",1,,"%1%\APPS\Codecs\quicktimealt122.exe /VERYSILENT /SP-"

HKLM,"%RunOnceEx%\install12",,,"Real Player Alternative"
HKLM,"%RunOnceEx%\install12",1,,"%1%\APPS\Codecs\realalt111.exe /VERYSILENT /SP-"

HKLM,"%RunOnceEx%\install13",,,"Additional NIC Drivers"
HKLM,"%RunOnceEx%\install13",1,,"%1%\APPS\MN130\mn130_100.exe /Q"

[Strings]
cdname = "Windows XP Professional CD-ROM"
productname = "Windows XP Professional"
cdtagfile = "\win51ip"
RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"


The line, 1 = %cdname%,%cdtagfile%,,"" , finds the install CD for me. My APPS directory is in the root of the CD. The [Strings] section identifies %cdname% and %cdtagfile%. The tag file is the common tag file found on the XP Pro CD-ROM.

It works.

#155
Bachus

Bachus

    Advanced Member

  • Member
  • PipPipPip
  • 408 posts
  • Joined 25-July 03
I thought I'd removed [guirunonce] a long time ago, but I'll look...
Nope, its not there. Here's the inf file I use before compressing it and renaming it to moviemk.inf

Attached Files



#156
GreenMachine

GreenMachine

    ineXPlicable

  • Developer
  • 3,062 posts
  • Joined 22-August 03
Nice reverse engineering, Spooky. Seems like strange behaviour ... Remember there is the RunOnceEx values, and the RunOnce values, which behave slightly differently. I believe GuiRunOnce uses the RunOnce values

#157
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • Joined 03-October 03
  • OS:none specified
  • Country: Country Flag
Well it appears i found out how runonceex is run. If you remember from my previous posts in different threads, i said runonce is run or "flushed" during the install, but runonceex is only run at the 13 min mark. The reason why is because ie.inf adds a runonce key that causes runonceex to be run. This key is run at the 13 min mark.

So let's say you added some entries to runonceex and you want to test it to see how it looks. In the past you would have had to restart your pc.

To run anything in the runonceex key immediatly type this command:

rundll32.exe iernonce.dll,RunOnceExProcess

So no longer do you need to restart to test that key.

You're probably thinking, "why don't i edit ie.inf and remove the line that adds that key so runonceex isn't run during setup?". The answer is ie.inf is digitally signed, and if you change one thing setup will blow up (at least that's been my experience).

I guess you could remove iernonce.dll from txtsetup.sif and dosnet.inf and see if that works. Or you could maybe make a batch file that runs at the 13 min mark that removes that runonce key.

-gosh

#158
Spooky

Spooky

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 718 posts
  • Joined 12-November 03

I thought I'd removed [guirunonce] a long time ago, but I'll look...
Nope, its not there.  Here's the inf file I use before compressing it and renaming it to moviemk.inf



how are you calling this file? (you shouldn't need to call it, cause it runs on its own from windows setup.) check your cmdlines.txt or any batch files that may be calling it.

Are you renaming the file AFTER you compress it?


anyway, I just use the moviemk.inf file for a few reasons:

1. It saves a lot of hassel, you dont need to call it or do any setup for it cause windows calls the moviemk.inf file as a normal part of install.

2. It doesn't matter what you put in it (as long as its formatted correctly as an .inf file is) as windows setup appears basically to ignore [just like a MS OS to ignore part of its self isn't it :) ] the thing except to execute it and then it seems it just leaves it along and it doesn't appear to be digitally signed.

3. windows setup does all the work for you by initiating the file at the 13 minute mark.

4. its one less file I have to add to the setup and its a fact that the simple cd detection scheme (which matches the native layout.inf scheme) works in moviemk.inf.



I took a look at your .inf, it looks ok from here, a few minor things - double quote marks at end of lines - but nothing that would cause you the problem your having.

I would recommed that you use the mediamk.inf file and just install media maker 2.0, its what I do and it works. If you use mediamk.inf your apps will install at the 13 minute mark - I gurantee it - and as a plus you get this nice professional looking 'windows type' look to the list that comes up. Just put your stuff in mediamk.inf - recab it - and put it back in the i386 dir on the CD. Oh yeah, one more thing, when you recab it use all upper case for the file name MEDIAMK.IN_

Oh yeah, also take out the restart thing also if you use the moviemk.inf file, cause the computer is going to reboot when this portion of setup finishes. If you keep the restart thing in the moviemk.inf file the machine is going to reboot 99 (your current settings) seconds after the .inf finishes and guess what - setup is going to terminate prematurely.

and to sort of go along with Gosh's thing too, the runonceex key evidently will run something put into it immediately (or within a minute or so depending upon how slow your install is going), if its a native windows .inf file putting the stuff there (in this case moviemk.inf). I use the runonceex in my moviemk.inf file and the things run immediately when the moviemk.inf is executed. And...if I take a look at the registry the keys are not there so they have probably been deleted (like MS said in their docs).

so my recommendation is to put your stuff in the moviemk.inf and install media player 2 in your install. Try it, I promise you'll like it.

I took the liberty of making a few minor changes to your .inf file. I put it into my moviemk.inf 'template' file and recabbed it. The attached zip has both in it, cabbed and expanded, properly named. Just drop the MOVIEMK.IN_ file in the i386 dir for your cd and make sure that its not being called from some where else.

Attached Files



#159
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • Joined 03-October 03
  • OS:none specified
  • Country: Country Flag
Even though cydine found a way to run runonce\setup at first logon, i decided to try to run runonceex at first logon (after setup is done).

How to use RunOnceEx at first logon:

1 - Delete moviemk.in_
2 - Make moviemk.inf in your i386 folder and put this:

[Version]
Signature="$Windows NT$"

[DefaultInstall]
AddReg=RunOnceEx

[RunOnceEx]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce","ZZZInstall",,"rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 %17%\runonceex.inf"

3 - Make runonceex.inf and put this in it:

[Version]
Signature=$CHICAGO$

[DefaultInstall]
AddReg = Runonceex

[Runonceex]
;http://support.micro...om/?kbid=232509
HKLM,"%RunOnceEx%\",Title,0,"Installing Applications"
HKLM,"%RunOnceEx%\",Flags,0x00010001,20
HKLM,"%RunOnceEx%\install1",,,"Adobe Acrobat 6"
HKLM,"%RunOnceEx%\install1",1,,"%10%\Apps\Adobe6\Adobe6.msi /QB"
HKLM,"%RunOnceEx%\install2",,,"AIM"
HKLM,"%RunOnceEx%\install2",1,,"%10%\Apps\AIM\aim.exe /silent"
HKLM,"%RunOnceEx%\install3",,,"Directx 9"
HKLM,"%RunOnceEx%\install3",1,,"%10%\Apps\DX9\dxsetup.exe /OPK"
HKLM,"%RunOnceEx%\install4",,,"Norton Antivirus Corp"
HKLM,"%RunOnceEx%\install4",1,,"%10%\Apps\Norton\navclnt.exe /qn"
HKLM,"%RunOnceEx%\install5",,,"Winrar 3.20"
HKLM,"%RunOnceEx%\install5",1,,"%10%\Apps\Winrar\silent /s"
HKLM,"%RunOnceEx%\install6",,,"Windows Media Player 9.0"
HKLM,"%RunOnceEx%\install6",1,,"%10%\Apps\WMP9\mpsetupedp.msi"

[Strings]

RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"

4 - Edit dosnet.inf and put this:

d1,runonceex.inf

5 - Edit txtsetup.sif and put this:

runonceex.inf = 1,,,,,,,20,0,0


Now when you install windows, at first logon runonceex will run and install your programs. I successfully tested this.

The reason this works is because during the OC phase a key is added to runonce to run an inf. At the 13 min mark, runonce is processed alphabetically.

This key is run:

"RunOnceEx"="rundll32.exe C:\\WINDOWS\\System32\\iernonce.dll,RunOnceExProcess"

Then at the end the ZZZInstall key is run, which runs an inf that adds entries to runonceex. Once the computer restarts to do the OOBE, the runonceex key is processed, the same as GuiRunOnce.

-gosh

#160
Spooky

Spooky

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 718 posts
  • Joined 12-November 03

Even though cydine found a way to run runonce\setup at first logon, i decided to try to run runonceex at first logon (after setup is done).

How to use RunOnceEx at first logon:

1 - Delete moviemk.in_
2 - Make moviemk.inf in your i386 folder and put this:

[Version]
Signature="$Windows NT$"

[DefaultInstall]
AddReg=RunOnceEx

[RunOnceEx]
HKLM,"SOFTWARE\Microsoft\Windows\CurrentVersion\Runonce","ZZZInstall",,"rundll32.exe setupapi.dll,InstallHinfSection DefaultInstall 128 %17%\runonceex.inf"

3 - Make runonceex.inf and put this in it:

[Version]
Signature=$CHICAGO$

[DefaultInstall]
AddReg = Runonceex

[Runonceex]
;http://support.micro...om/?kbid=232509
HKLM,"%RunOnceEx%\",Title,0,"Installing Applications"
HKLM,"%RunOnceEx%\",Flags,0x00010001,20
HKLM,"%RunOnceEx%\install1",,,"Adobe Acrobat 6"
HKLM,"%RunOnceEx%\install1",1,,"%10%\Apps\Adobe6\Adobe6.msi /QB"
HKLM,"%RunOnceEx%\install2",,,"AIM"
HKLM,"%RunOnceEx%\install2",1,,"%10%\Apps\AIM\aim.exe /silent"
HKLM,"%RunOnceEx%\install3",,,"Directx 9"
HKLM,"%RunOnceEx%\install3",1,,"%10%\Apps\DX9\dxsetup.exe /OPK"
HKLM,"%RunOnceEx%\install4",,,"Norton Antivirus Corp"
HKLM,"%RunOnceEx%\install4",1,,"%10%\Apps\Norton\navclnt.exe /qn"
HKLM,"%RunOnceEx%\install5",,,"Winrar 3.20"
HKLM,"%RunOnceEx%\install5",1,,"%10%\Apps\Winrar\silent /s"
HKLM,"%RunOnceEx%\install6",,,"Windows Media Player 9.0"
HKLM,"%RunOnceEx%\install6",1,,"%10%\Apps\WMP9\mpsetupedp.msi"

[Strings]

RunOnceEx        = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"

4 - Edit dosnet.inf and put this:

d1,runonceex.inf

5 - Edit txtsetup.sif and put this:

runonceex.inf = 1,,,,,,,20,0,0


Now when you install windows, at first logon runonceex will run and install your programs.  I successfully tested this.

The reason this works is because during the OC phase a key is added to runonce to run an inf.  At the 13 min mark, runonce is processed alphabetically.

This key is run:

"RunOnceEx"="rundll32.exe C:\\WINDOWS\\System32\\iernonce.dll,RunOnceExProcess"

Then at the end the ZZZInstall key is run, which runs an inf that adds entries to runonceex.  Once the computer restarts to do the OOBE, the runonceex key is processed, the same as GuiRunOnce.

-gosh

yeah but wre trying to get the stuff to install at the 13 minute mark tho aren't we, at least i am.

#161
GreenMachine

GreenMachine

    ineXPlicable

  • Developer
  • 3,062 posts
  • Joined 22-August 03

...  i decided to try to run runonceex at first logon ...

Why make it complicated with yet another inf? I simply import the RunOnceEx values from CMDLINES.TXT as such:
Windows Registry Editor Version 5.00  
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]  
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]  
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\101]  
@="Installing Update: HMTCDW~1"  
"1"="HMTCDW~1.EXE /QB"  
RunOnceEx is parsed upon next logon.


-GreenMachine
-GreenMachine

#162
gosh

gosh

    gosh 2.0

  • Patrons
  • 2,347 posts
  • Joined 03-October 03
  • OS:none specified
  • Country: Country Flag
If you want something to install using runonceex add the registry keys at any point before the 13 min mark, such as using txsetup.sif or sysoc.inf. That's already been done. What hasn't been done (until cydine's post, and im sorry if i missed giving credit to anyone), is running runonceex AFTER setup is done, not using guirunonce.

-gosh

#163
cydine

cydine

    Newbie

  • Member
  • 21 posts
  • Joined 23-November 03
What exactly are the benefits of using RunOnceEx over RunOnce\Setup?

#164
GreenMachine

GreenMachine

    ineXPlicable

  • Developer
  • 3,062 posts
  • Joined 22-August 03
There are a few improvements over RunOnce ( I believe the Ex at the end is for "Extended" ... ). HERE is Microsoft's take on it.

Status: A dialog box is displayed while the items contained in the registry key are being processed. The entries to be processed are grouped into sections and the dialog box highlights the current section being processed. You can disable the status dialog box feature.

Performance: The majority of the commands contained in the Run and RunOnce registry keys create separate processes, which is inefficient. The RunOnceEx registry key does not create a separate process. The RunOnceEx registry key also supports a dependency list of DLLs that remain loaded while either all the sections or some of the sections are being processed.

Error Handling: If an exception occurs while calling a function in a DLL, the exception is caught and an error dialog box is displayed to the user. You can suppress this error dialog box by using a flag in the RunOnceEx registry key. You can also set a flag to enable log errors and run the RunOnceEx registry key.

Deterministic: The RunOnceEx registry key sorts the entries and sections alphabetically to force a deterministic order.


-GreenMachine
-GreenMachine

#165
Spooky

Spooky

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 718 posts
  • Joined 12-November 03

There are a few improvements over RunOnce ( I believe the Ex at the end is for "Extended" ... ). HERE is Microsoft's take on it.

Status: A dialog box is displayed while the items contained in the registry key are being processed. The entries to be processed are grouped into sections and the dialog box highlights the current section being processed. You can disable the status dialog box feature.

Performance: The majority of the commands contained in the Run and RunOnce registry keys create separate processes, which is inefficient. The RunOnceEx registry key does not create a separate process. The RunOnceEx registry key also supports a dependency list of DLLs that remain loaded while either all the sections or some of the sections are being processed.

Error Handling: If an exception occurs while calling a function in a DLL, the exception is caught and an error dialog box is displayed to the user. You can suppress this error dialog box by using a flag in the RunOnceEx registry key. You can also set a flag to enable log errors and run the RunOnceEx registry key.

Deterministic: The RunOnceEx registry key sorts the entries and sections alphabetically to force a deterministic order.


-GreenMachine
-GreenMachine

RunOnceEx is faster at installing things for me at the 13 minute mark.

#166
GreenMachine

GreenMachine

    ineXPlicable

  • Developer
  • 3,062 posts
  • Joined 22-August 03

... RunOnceEx is faster at installing things for me at the 13 minute mark.

Yeah, that's what I was trying to say! I think the reasons for this are those listed in the Performance section.


-GreenMachine

#167
beppemito

beppemito

    Advanced Member

  • Member
  • PipPipPip
  • 422 posts
  • Joined 31-August 03

Awhile back Dave mentioned a way to install updates using runonceex (he called it the windows update method).  The thread is here http://www.MSFN.org/...53&hl=runonceex

I thought i would try runonceex to see if it was a good alternative.  After about an hour, i got all my apps installed via runonceex.  The results are so good im considering not using a batch file at all during my unattended install, and just using 3 inf files.

I have 2 things to mention which i haven't seen mentioned before about this method:

First, view the picture below to see how it looks.  Notice how the user can't click on anything to stop the install.  Using a batch file, the user can close the batch file to stop the install.  Also notice how professional it looks, it looks a lot better than a batch file.

Second, during testing of this method i noticed you cannot use variables like %windir%.  In Dave's thread he gets around this by putting the full path, ie c:\install.  This is fine for him, but one of my requirements of my unattended install is to be installed on any partition without any problems.  Obviously this method would require a static path.  But i found a way around this :D

Here's a sample of my inf that uses this method.  Notice the %10%:

[Version]
Signature=$CHICAGO$

[DefaultInstall]
AddReg=install.apps

[Install.Apps]
;http://support.microsoft.com/?kbid=232509
HKLM,"%RunOnceEx%\",Title,0,"Installing Applications"
HKLM,"%RunOnceEx%\",Flags,0x00010001,20
HKLM,"%RunOnceEx%\install1",,,"Adobe Acrobat 6"
HKLM,"%RunOnceEx%\install1",1,,"%10%\Apps\Adobe6\Adobe6.msi /QB"
HKLM,"%RunOnceEx%\install2",,,"AIM"
HKLM,"%RunOnceEx%\install2",1,,"%10%\Apps\AIM\aim.exe /silent"
HKLM,"%RunOnceEx%\install3",,,"Directx 9"
HKLM,"%RunOnceEx%\install3",1,,"%10%\Apps\DX9\dxsetup.exe /OPK"
HKLM,"%RunOnceEx%\install4",,,"Norton Antivirus Corp"
HKLM,"%RunOnceEx%\install4",1,,"%10%\Apps\Norton\navclnt.exe /qn"
HKLM,"%RunOnceEx%\install5",,,"Winrar 3.20"
HKLM,"%RunOnceEx%\install5",1,,"%10%\Apps\Winrar\silent /s"
HKLM,"%RunOnceEx%\install6",,,"Windows Media Player 9.0"
HKLM,"%RunOnceEx%\install6",1,,"%10%\Apps\WMP9\mpsetupedp.msi"


[strings]
RunOnceEx         = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"

As you see, i used %10% for the path.  %10% maps to %windir%.  I tested this twice and both times it worked like a champ.  You can only use %10% in an inf file, not a .reg file.  Yet another reason to use inf files :D  If you need to use another variable, here's the full list from my install.inf:

;        0xffff The directory from which the INF was installed.
;        01 SourceDrive:\path.
;        10 Windows directory.
;        11 System directory. (%windir%\system32)
;        12 Drivers directory.(%windir%\system32\drivers)
;        17 INF file directory.
;        18 Help directory.
;        20 Fonts directory.
;        21 Viewers directory.
;        24 Applications directory.
;        25 Shared directory.
;        30 Root directory of the boot drive.
;        50 %windir%\system
;        51 Spool directory.
;        52 Spool drivers directory.
;        53 User Profile directory.
;        54 Path to ntldr or OSLOADER.EXE

-gosh

where can i find a full guide for do this?i'm not very good to understanding and i'm not speaking english too!!! :) someone can help me?please....and also...after that, my programs.cmd:
CLS
@echo off
ECHO.
ECHO Sto installando Adobe Reader 6
ECHO Attendere...
start /wait %systemdrive%\install\Adobe6\AR6.msi /QB
ECHO.
ECHO Sto WinRar 3.20
ECHO Attendere...
start /wait %systemdrive%\install\winrar\winrar320.exe -s
ECHO.
ECHO Sto installando DivX 5.1.1 decoder e Xvid decoder
ECHO Attendere...
regsvr32.exe %systemroot%\system32\xvid.ax /s
regsvr32.exe %systemroot%\system32\divxdec.ax /s
REGEDIT /S %systemdrive%\install\divx_xvid.reg
ECHO.
ECHO Sto installando AC3 filter 0.70b
ECHO Attendere...
start /wait %systemdrive%\install\ac3\ac3filter_0_70b.exe /S /D="%systemdrive%\Program Files\AC3Filter"
ECHO.
ECHO Sto installando Sun Java 1.4.2_02...
start /wait %systemdrive%\install\javaup\jre14202.exe /s /v"/qn ADDLOCAL=jrecore,extra REBOOT=Suppress"
ECHO.
ECHO Sto installando MSN Messenger 6.1.0203
ECHO Attendere...
start /wait %systemdrive%\install\msn61\MsnMsgs.msi /QB
ECHO.
ECHO Sto registrando Nero Burning ROM...
REGEDIT /S %systemdrive%\install\nero6\register.reg
ECHO.
ECHO Sto installando Nero Burning ROM v6.0.0.23
ECHO Attendere...
start /wait %systemdrive%\install\nero6\nero6023.exe /silent /noreboot
ECHO.
ECHO Sto installando la traduzione in italiano per Nero Burning ROM v6.0.0.23
ECHO Attendere...
start /wait %systemdrive%\install\nero6\ita.exe /silent /noreboot
ECHO.
ECHO Sto installando Flashget 1.4
ECHO Attendere...
start /wait %systemdrive%\install\fg140\fgf140.exe /S
ECHO.
ECHO Sto registrando Flashget 1.4
REGEDIT /S %systemdrive%\install\fg140\register.reg
ECHO.
ECHO Sto installando Kazaa Lite 2.43 ita
ECHO Attendere...
start /wait %systemdrive%\install\klite\243ita.exe /silent
ECHO.
ECHO Sto installando Norton Antivirus 2004
ECHO Attendere...
start /wait %systemdrive%\install\norton2004\NAVSETUP.EXE /QB
xcopy /R /K /Y "%systemdrive%\install\norton2004\Catalog.LiveSubscribe" "%systemdrive%\Documents and Settings\All Users\Dati applicazioni\Symantec\LiveSubscribe"
ECHO.
REGEDIT /S %systemdrive%\install\wfpriabilita.reg
ECHO.
ECHO Sto eliminando i file d'installazione temporanei...
RD /S /Q %systemdrive%\install
ECHO.
EXIT
can be deleted?
and also...is good this for patch my subscribe to year 2090?
ECHO.
ECHO Sto installando Norton Antivirus 2004
ECHO Attendere...
start /wait %systemdrive%\install\norton2004\NAVSETUP.EXE /QB
xcopy /R /K /Y "%systemdrive%\install\norton2004\Catalog.LiveSubscribe" "%systemdrive%\Documents and Settings\All Users\Dati applicazioni\Symantec\LiveSubscribe"
thanks for all!!!! :rolleyes:

#168
beppemito

beppemito

    Advanced Member

  • Member
  • PipPipPip
  • 422 posts
  • Joined 31-August 03
anyone? :)

#169
Marztabator

Marztabator

    Advanced Member

  • Member
  • PipPipPip
  • 481 posts
  • Joined 31-July 03
Dammit...... here's my current install.inf:

install.inf
[Version]
Signature=$CHICAGO$

[DefaultInstall]
AddReg=install.apps

[Install.Apps]
;http://support.microsoft.com/?kbid=232509
HKLM,"%RunOnceEx%\",Title,0,"Installing Applications"
HKLM,"%RunOnceEx%\",Flags,0x00010001,20
HKLM,"%RunOnceEx%\install01",,,"Tweak UI"
HKLM,"%RunOnceEx%\install01",1,,"%10%\TweakUI.msi /QB"
HKLM,"%RunOnceEx%\install02",,,"(Inserting Tweak UI into the Control Panel)"
HKLM,"%RunOnceEx%\install02",1,,"%10%\wscript.exe TweakUI.vbs //B"
HKLM,"%RunOnceEx%\install03",,,"Soundblaster Live! Drivers"
HKLM,"%RunOnceEx%\install03",1,,"%10%\SBLive!\CTZAPXX.exe /s"
HKLM,"%RunOnceEx%\install04",,,"Windows Media Player 8 (KB817787) Hotfix"
HKLM,"%RunOnceEx%\install04",1,,"%10%\KB817787.exe /Q:U /R:N"

[Strings]

RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"


Now, it is currently in the $$ directory, since I'm trying to run the inf from GuiRunOnce. Speaking of which, here's my current winnt.sif laid out:

winnt.sif
;SetupMgrTag
[Data]
    AutoPartition=0
    MsDosInitiated=0
    UnattendedInstall=Yes

[Unattended]
    UnattendMode=FullUnattended
    OemSkipEula=Yes
    OemPreinstall=Yes
    TargetPath=\WINDOWS
    Repartition=No
    UnattendSwitch=No
    WaitForReboot=No
    Hibernation=No
    DriverSigningPolicy=Ignore
  OemPnPDriversPath="Drivers\000_VIA\WinXP;Drivers\000_VIA\Inf\WinXP;Drivers\000_VIA\IDEWinXP;Drivers\000_VIA\AGP;Drivers\001_NVidia"
    KeyboardLayout="United Kingdom"

[GuiUnattended]
    AdminPassword=*
    EncryptedAdminPassword=NO
    OEMSkipRegional=1
    TimeZone=85
    OemSkipWelcome=1

[UserData]
    ProductKey=
    FullName="Marz of Zenogias"
    OrgName="Zenogias Gunshot Glitter Gathering"
    ComputerName=marz-tjza1ttk

[Display]
    BitsPerPel=32
    Xresolution=1024
    YResolution=768
    Vrefresh=85

[TapiLocation]
    CountryCode=44
    Dialing=Tone
    AreaCode=01895

[RegionalSettings]
    LanguageGroup=7,8,10,9,1
    Language=00000809

[Identification]
    JoinWorkgroup=HOME

[Shell]
    CustomDefaultThemeFile="%WinDir%\Resources\Themes\Sunset View.theme"

[SystemFileProtection]
    SFCQuota=0

[Components]
    autoupdate=off
    dialer=off
    fax=off
    msmsgs=off
    msnexplr=off
    IEAccess=off
    OEAccess=off

[GuiRunOnce]
    Command0="rundll32 setupapi.dll,InstallHinfSection DefaultInstall 128 .\install.inf"
    Command1="Cleanup.cmd"

[Branding]
    BrandIEUsingUnattended=Yes

[URL]
    Home_Page=about:blank

[Networking]
    InstallDefaultComponents=Yes

Another problem: Quick Launch, while hidden by default, appears to end up broken from the start! I select the option under the Taskbar menu but I get "Cannot create toolbar."

This was tested under Virtual PC 5.2. Any suggestions?

#170
Gism0

Gism0

    Huh?

  • Member
  • PipPipPip
  • 473 posts
  • Joined 11-November 03
might wanna take out your product key btw

did you use the registry tweak to enable it?
Wise man say, "forgiveness is divine, but never pay full price for late pizza." -Michelangelo

#171
Marztabator

Marztabator

    Advanced Member

  • Member
  • PipPipPip
  • 481 posts
  • Joined 31-July 03

might wanna take out your product key btw

did you use the registry tweak to enable it?

Dang, forgot about that! Oh well, looks like some kind soul went and hid it for moi. :)


What registry key are you on about btw?

#172
Gism0

Gism0

    Huh?

  • Member
  • PipPipPip
  • 473 posts
  • Joined 11-November 03
theres a registry tweak to enable quicklaunch automatically see this thread

I think it will display that error if the quicklaunch folder has been deleted somehow, check to see that it still exists, it should be in

\Documents and Settings\you\Application Data\Microsoft\Internet Explorer\Quick Launch
Wise man say, "forgiveness is divine, but never pay full price for late pizza." -Michelangelo

#173
Marztabator

Marztabator

    Advanced Member

  • Member
  • PipPipPip
  • 481 posts
  • Joined 31-July 03
Yes, I seem to recall typing "Quick Launch" into the search box but it came up with nothing. So I assume one of the other switches/tweaks is causing the QL folder to be deleted upon installation... but which one?

#174
Gism0

Gism0

    Huh?

  • Member
  • PipPipPip
  • 473 posts
  • Joined 11-November 03
i doubt its a registry tweak, have you got batch files deleting anything?
check to see that all the other folders are there too!
Wise man say, "forgiveness is divine, but never pay full price for late pizza." -Michelangelo

#175
Marztabator

Marztabator

    Advanced Member

  • Member
  • PipPipPip
  • 481 posts
  • Joined 31-July 03
Oh feck, I forgot to mention the initial problem with my install.inf (the Quick Launch thing was "another problem" after all) - when I execute it in GuiRunOnce I get an error box saying "Installation failed". It doesn't explain any more than that. Have I made a typo in my inf or something like that?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users