gareththegod Posted August 19, 2004 Share Posted August 19, 2004 I use the runonceex to install updates to new pcs we get into work. I was just wondering if its possible to sliently install of the following with only restarting after the last update:1. XP Network SP2 install.2. NET Framework v1.1.3. Microsoft Journal Viewer.4. Qfecheck.5. Open command prompt here powertoy.6. 831240 HighMAT Support in CD Writing update.7. qfecheck after restart settings (runonceex import to check that hotfixes have installed ok).here is my all.inf[version]signature="$Windows NT$"[DefaultInstall]; Anything added here will get installed if choosing RIGHT CLICK -> INSTALL.AddReg = XPSP2, Restart[SP2+All.inf]AddReg = XPSP2, Apps, Critical, Recommended, Restart[All.inf]AddReg = Apps, Critical, Recommended, Restart[Apps.inf]AddReg = Apps, Restart[Critical.inf]AddReg = Critical, Restart[Recommended.inf]AddReg = Recommended, Restart[XPSP2]HKLM,"%RunOnceEx%\",Title,0,"Installing windows XP SP2."HKLM,"%RunOnceEx%\001",,,".windows XP SP2"HKLM,"%RunOnceEx%\001",1,,"%01%\XPSP2.exe /passive /Z /O"[Apps]HKLM,"%RunOnceEx%\",Title,0,"Installing Apps."HKLM,"%RunOnceEx%\apps001",,,".NET Framework v1.1"HKLM,"%RunOnceEx%\apps001",1,,"%01%\Apps\dotnetfx.exe"HKLM,"%RunOnceEx%\apps002",,,"Microsoft Journal Viewer"HKLM,"%RunOnceEx%\apps002",1,,"%01%\Apps\Journal.msi /QBHKLM,"%RunOnceEx%\apps003",,,"282784 Qfecheck.exe Verifies Hotfixes"HKLM,"%RunOnceEx%\apps003",1,,"%01%\Apps\Q282784.exe /Z /Q"HKLM,"%RunOnceEx%\apps004",,,"Open command prompt here powertoy"HKLM,"%RunOnceEx%\apps004",1,,"%01%\Apps\CmdHerePowertoySetup.exe /S /v/qn"HKLM,"%RunOnceEx%\apps005",,,"831240 HighMAT Support in CD Writing..."HKLM,"%RunOnceEx%\apps005",1,,"%01%\Apps\HMTCDWizard.exe"HKLM,"%RunOnceEx%\apps006",,,"qfecheck after restart settings"HKLM,"%RunOnceEx%\apps006",1,,"rundll32 setupapi,InstallHinfSection DefaultInstall 128 %01%\Apps\check.inf"[Critical]; type 1; HKLM,"%RunOnceEx%\",Title,0,"Installing Critical Updates."; HKLM,"%RunOnceEx%\critical001",,,"NAME GOES HERE"; HKLM,"%RunOnceEx%\critical001",1,,"%01%\Critical\UPDATE.EXE /Z /O /U /Q"; type 2[Recommended]; HKLM,"%RunOnceEx%\",Title,0,"Installing Recommended Updates."; HKLM,"%RunOnceEx%\reco001",,,"NAME GOES HERE"; HKLM,"%RunOnceEx%\reco001",1,,"%01%\Recommended\PROGRAM.EXE /Z /O /U /Q"[Restart]HKLM,"%RunOnceEx%\ZRestart001",,,"Restarting after install"HKLM,"%RunOnceEx%\ZRestart001",1,,"shutdown -r -t 99 -f"[Strings]; Any variables you use need to be defined under [strings].RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"[INFO]; key below to run any thing in the runonceex without needing to restart; rundll32.exe iernonce.dll,RunOnceExProcess; The command will run the section called [XXXXX] in the FILENAME.INF file ; 128 tells setup to NOT restart if the inf needs to restart the pc; rundll32 setupapi,InstallHinfSection XXXXX 128 .\FILENAME.INFIt will be called from run.cmd@ ECHO OFFECHO Running XPSP2 and all updates not included (SP2+All.inf)ECHO And Restarting After 99 Seconds.rundll32 setupapi,InstallHinfSection SP2+All.inf 128 .\hotfixes\All.infrundll32.exe iernonce.dll,RunOnceExProcessExitThe main thing that I don't know is would it work as sp2 makes its own mini setup.Does anyone know how too disable this mini setup after the restart I want it to use the firewall then I will disable it later.If I do need to change the setttings is there a way to make a digital signature for the Netfw.inf and repack the network install to use this.I know that this is technical. I can't test at mo as I don't know how or if its possible to disable the mini setup or make the digital signature.check.inf code if needed.[version]signature="$Windows NT$"; windows NT only[DefaultInstall]; Anything added here will get installed if choosing RIGHT CLICK -> INSTALL.AddReg = Apps[Apps]HKLM,"%RunOnceEx%\zcheck001",,,"QFEcheck"HKLM,"%RunOnceEx%\zcheck001",1,,"qfecheck.exe /l:%30%\ /q"[Strings]; Any variables you use need to be defined under [strings].RunOnceEx = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx"[INFO]; key below to run any thing in the runonceex without needing to restart; rundll32.exe iernonce.dll,RunOnceExProcess; The command will run the section called [XXXXX] in the FILENAME.INF file ; 128 tells setup to NOT restart if the inf needs to restart the pc; rundll32 setupapi,InstallHinfSection XXXXX 128 .\FILENAME.INF Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now