Jump to content

RunOnceEx.cmd from %CDROM% , just to make sure


Recommended Posts

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

and 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

Link to comment
Share on other sites


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

Link to comment
Share on other sites

@Incroyable HULK

I'm using RunOnce Ex.exe too and it runs well from cmdlines.txt

Here 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=%%d
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Applications" /f
reg add %key%\001 /ve /d "Start installation" /f
reg add %key%\001 /v 1 /d "%systemdrive%\Install\all.exe /silent /sp-" /f
exit

and of course cmdlines.txt

[commands]
"all.exe"

Hope helps.

moo

Link to comment
Share on other sites

[GuiRunOnce] is executed at first logon at the SAME time as RunOnceEx.cmd look HERE

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

Link to comment
Share on other sites

hmm that depends...one can force RunOnceEx to execute really at any time.

Example

cmdow @ /HID
@echo off

for %%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=%%i

SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx


REG ADD %KEY% /V TITLE /D "Installing CD & DVD Tools" /f

REG ADD %KEY%\005 /VE /D "Installing ASPI Layer" /f
REG ADD %KEY%\005 /V 1 /D "%CDROM%\SOFTWARE\Tools_-_CD_&_DVD\ASPI\ASPI_4.71.2_au3.exe" /f

start /wait rundll32.exe iernonce.dll,RunOnceExProcess

EXIT

Normally yes you are correct.

Link to comment
Share on other sites

@ankap

thanks 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\ folder

2) Lancement.exe (.cmd converted) is scanning for the %CDROM% and then launching Installation.exe

3) Installation.exe (my RunOnceEx.cmd converted) is starting my applications installation

4) Installation.exe is launching Nettoyage.exe (cleanup.cmd converted) also located on my %CDROM%

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