December 24, 200421 yr Is it possible to launch RunOnceEx.cmd from the CD directly under the [GuiRunOnce] section of winnt.sif?for now I can do it in two steps:[GuiRunOnce]%systemdrive%\install\Launch.cmdand then in my launch.cmd:FOR %%i IN (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:\CD.bin SET CDROM=%%i:%CDROM%\CD\Script\RunOnceEx.cmd
December 24, 200421 yr Why are you running RunOnceEx.cmd from [GuiRunOnce]? I thought the idea was to run it from cmdlines.txt so that the programs get installed at first login, not second?Either way, the method your already using is the only way i can think of to call an installer of the cdrom from [GuiRunOnce]. I don't believe there is a system variable that will point to the Windows CD. If there was, that FOR statement we are all so familiar with would probably never have been written.
December 24, 200421 yr Author [GuiRunOnce] is executed at first logon at the SAME time as RunOnceEx.cmd look HEREThe reason I am launching from there is because My RunOnceEx.cmd is compiled to RunOnceEx.exe and it didn't launched succesfuly when I was calling it from cmdlines.txt (for Windows 2000 SP4)
December 24, 200421 yr @Incroyable HULKI'm using RunOnce Ex.exe too and it runs well from cmdlines.txtHere is the code that I use.cmdow @ /HID@echo off FOR %%d 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 %%d\CD.txt SET CDROM=%%dSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing Applications" /freg add %key%\001 /ve /d "Start installation" /freg add %key%\001 /v 1 /d "%systemdrive%\Install\all.exe /silent /sp-" /fexitand of course cmdlines.txt[commands]"all.exe"Hope helps.moo
December 24, 200421 yr Author if I launch my RunOnceEx.exe from cmdlines.txt, it doesnt' work... at least for Windows 2000 SP4. I haven't tried yet on WinXP.This is why I am launching from GuiRonOnce...
December 25, 200421 yr [GuiRunOnce] is executed at first logon at the SAME time as RunOnceEx.cmd look HEREThat's not quite right. RunOnceEx.cmd's true function is to import regkeys that define programs to be "Run once," at next boot up. The reason the page you linked to states that they run at the same time is that the guide also says to launch RunOnceEx.cmd from cmdlines.txt, thus importing the "Run-at-next-boot" keys before the very first time the PC boots.If you call your RunOnceEx script from within [GuiRunOnce], the keys will not be imported until the first boot, and therefore not executed until the second boot. I am assuming, of course, that your RunOnce script resembles the sample posted by moo.Hopefully this clears up some confusion. I have never used RunOnceEx.cmd myself yet, but I understand all those who do are calling it from cmdlines.txt.I will mention in the uA Guide suggested upgrades thread that maybe the explanation there could be made a little clearer.
December 25, 200421 yr hmm that depends...one can force RunOnceEx to execute really at any time.Examplecmdow @ /HID@echo offfor %%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\WIN51 set CDROM=%%iSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceExREG ADD %KEY% /V TITLE /D "Installing CD & DVD Tools" /fREG ADD %KEY%\005 /VE /D "Installing ASPI Layer" /fREG ADD %KEY%\005 /V 1 /D "%CDROM%\SOFTWARE\Tools_-_CD_&_DVD\ASPI\ASPI_4.71.2_au3.exe" /fstart /wait rundll32.exe iernonce.dll,RunOnceExProcessEXITNormally yes you are correct.
December 25, 200421 yr Thanks for adding that, Nologic. It is for exactly this reason that I love the quote in my signature. Now I know, and knowing is half the battle.
December 25, 200421 yr Author Yeah... Sorry I omitted to mention I am using this wonderfull command:rundll32.exe iernonce.dll,RunOnceExProcessand you are right. If I don't use this command, the key will get executed at next reboot
December 26, 200421 yr @Incroyable Look this post CD ChangerYou can launch this tool from [RunGUIOnce] giving it parameters of commands it will get CD Drive Letter and execute command from CD.The description is on posted.
December 27, 200421 yr Author @ankapthanks but your utility has to be present on the hard drive to be launched from GuiRunOnce. This is what I wanted to bypass... being able to launch my RunOnceEx.cmd on my CD directly from GuiRunOnce.For now this is what I am doing:1) GuiRunOnce is launching Lancement.exe in my %windir%\Temp\ folder2) Lancement.exe (.cmd converted) is scanning for the %CDROM% and then launching Installation.exe3) Installation.exe (my RunOnceEx.cmd converted) is starting my applications installation4) Installation.exe is launching Nettoyage.exe (cleanup.cmd converted) also located on my %CDROM%
Create an account or sign in to comment