Jump to content

Too many installs to be seen on the Runonce list?


Recommended Posts

Posted

Whenever you put entries in the RunOnceEx registry key, all keys in it is run in alphanumerical order, once at the next reboot. (used keys are deleted aftwards)

To execute the RunOnceEx Key without the need of the system reboot you can use the command

'rundll32.exe iernonce.dll,RunOnceExProcess' after registering

So if you want to make consecutive RunOnceEx windows runs at logon, just call the other RunOnceEx

command file at the end of the current one and put 'rundll32.exe iernonce.dll,RunOnceExProcess'

at his end.

Here an example:

1stRunOnceEx.cmd executed from cmdlines.txt adds registry entries at T-12

FOR %%D IN (d: e: f: g: h: i: j: k: l: m: n: o: p: q: r: s: t: u: v: w: x:) DO IF EXIST %%D\WIN51IP SET CDROM=%%D
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET PG=%CDROM%\APPS1

REG ADD %KEY% /V TITLE /D "1st list of apps to be execute" /f

REG ADD %KEY%\000 /VE /D "1st application" /f
REG ADD %KEY%\000 /V A /D "%PG%\1stApp.exe" /switch1 /switch2" /f

REG ADD %KEY%\010 /VE /D "2nd application" /f
REG ADD %KEY%\010 /V 1 /D "%PG%\2ndApp.exe" /switch1 /switch2" /f

[i](etc...)[/i]

REG ADD %KEY%\zzz /VE /D "Cmd to register other entries" [i]<-- don't add this if you don't want it to be listed[/i]
REG ADD %KEY%\zzz /V Z /D %Path_to%\2ndRunonceEx.cmd /f

This will be executed at first logon coz the RunOnceEx Registry Key needs a reboot or the

'rundll32.exe iernonce.dll,RunOnceExProcess' command to be executed

2ndRunOnceEx.cmd

FOR %%D 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 %%D\WIN51IP SET CDROM=%%D
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET PG=%CDROM%\APPS2

REG ADD %KEY% /V TITLE /D "2nd list of apps to be execute" /f

REG ADD %KEY%\000 /VE /D "1st application" /f
REG ADD %KEY%\000 /V A /D "%PG%\1stApp.exe" /switch1 /switch2" /f

REG ADD %KEY%\010 /VE /D "2nd application" /f
REG ADD %KEY%\010 /V 1 /D "%PG%\2ndApp.exe" /switch1 /switch2" /f

[i](etc...)[/i]

REG ADD %KEY%\zzz /VE /D "Cmd to register other entries" [i]<-- don't add this if you don't want it to be listed[/i]
REG ADD %KEY%\zzz /V Z /D %Path_to%\my_next_RunonceEx.cmd /f

rundll32 iernonce.dll,RunOnceExProcess

The 2ndRunOnceEx.cmd will register his entries in the registry when the 1st set of programs are done

and since we add 'rundll32 iernonce.dll,RunOnceExProcess' it will run the new RunOnceEx entries

and will call the my_next_RunOnceEx.cmd at the end of it, and so on...


Posted

Yeah, I can see how that works too... but simply adding that line, and starting the sequence off agin, without calling for a second ROE file works too... you are in effect relaunching the same window, but with different installs.

I only found the need to use a second ROE file, as I needed to reboot after the first one, prior to installing all my apps and tweaks... this way, it would start afresh, I know ROE will carry on from where it left off if it reboots half way through, but I wanted to start with a fresh window.

I have 3 new windows which are all generated from the same ROE.cmd, without calling for a new .cmd file.

Posted

Well, below is my only RunOnceEx, it executes right after is executed, without no reboot or something

Don't understood how to sove this :(

cmdow @ /HID

@echo off

for %%a in (z y x w v u t s r q p o n m l k j i h g f e d c) do if exist %%a:\CD.TXT (

set CDROM=%%a:

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

goto install

)

:install

REG ADD %KEY% /V TITLE /D "Registry" /f

REG ADD %KEY%\001 /VE /D "Application name" /f

REG ADD %KEY%\001 /V 1 /D "Application swtiches" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "AudioVideo" /f

REG ADD %KEY%\001 /VE /D "Application name" /f

REG ADD %KEY%\001 /V 1 /D "Application swtiches" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "CGI" /f

REG ADD %KEY%\001 /VE /D "Application name" /f

REG ADD %KEY%\001 /V 1 /D "Application swtiches" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "MISC" /f

REG ADD %KEY%\001 /VE /D "Application name" /f

REG ADD %KEY%\001 /V 1 /D "Application swtiches" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "System" /f

REG ADD %KEY%\001 /VE /D "Application name" /f

REG ADD %KEY%\001 /V 1 /D "Application swtiches" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY% /V TITLE /D "Cleaning and rebooting" /f

REG ADD %KEY%\001 /VE /D "Application name" /f

REG ADD %KEY%\001 /V 1 /D "Application swtiches" /f

EXIT

Posted (edited)

EDITED POST - MISREAD USERS INFO....

Im not too sure what you want to achieve with this scriipt, that certainly seems as if it would install Registry, AudioVideo, CGI... in seperate windows, with no reboot (as there is no reboot command present).

Perhaps if you explained how you wanted it to behave, I could assist further...???

Thanks

Edited by drscouse
Posted

thats exactly what this script is for, the problem is that it is executed during the 12min setup part, no after the 1st logon

Posted

@Orsi - I think you're getting confused as to how things happen. Re-read Manuarii's post earlier for a bit of clarification. The code that you have isn't going to get you very far... ;)

Posted

So is this correct

cmdow @ /HID
@echo off

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.txt SET CDROM=%%i:

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

REG ADD %KEY% /V TITLE /D "Applications" /f


REG ADD %KEY%\001 /VE /D "DVD Shrink (Cab)" /f

REG ADD %KEY%\002 /VE /D "Adobe Reader 7 (Cab)" /f

REG ADD %KEY%\003 /VE /D "Java Runtime (Cab)" /f

REG ADD %KEY%\005 /VE /D ".Net Framework 1.1 SP1 (Cab)" /f

REG ADD %KEY%\006 /VE /D "Windows Media Player 10 (Cab)" /f

REG ADD %KEY%\007 /VE /D ".Net Framework 2.0" /f
REG ADD %KEY%\007 /V 1 /D "%CDROM%\Software\Utilities\dotnetfx2.exe" /f

REG ADD %KEY%\008 /VE /D "Daemon Tools 3.47" /f
REG ADD %KEY%\008 /V 1 /D "%CDROM%\Software\Utilities\daemon.msi /qb /passive /norestart" /f

REG ADD %KEY%\009 /VE /D "Tight VNC" /f
REG ADD %KEY%\009 /V 1 /D "%CDROM%\Software\Applications\VNC\tightvnc-1.2.9-setup.exe /silent" /f
REG ADD %KEY%\009 /V 2 /D "REGEDIT /S %CDROM%\Software\Applications\VNC\vncservice.reg" /f

REG ADD %KEY%\010 /VE /D "QuickPar 9.1.0" /f
REG ADD %KEY%\010 /V 1 /D "%CDROM%\Software\Applications\QuickPar-0.9.1.0.exe /S" /f

REG ADD %KEY%\011 /VE /D "DU Meter 3.07" /f
REG ADD %KEY%\011 /V 1 /D "%CDROM%\Software\Applications\Dumeter\DUmeter.exe /VERYSILENT /SP-" /f
REG ADD %KEY%\011 /V 2 /D "REGEDIT /S %CDROM%\Software\Applications\Dumeter\dumeter.reg" /f

REG ADD %KEY%\012 /VE /D "PerfectDisk 7.0" /f
REG ADD %KEY%\012 /V 1 /D "REGEDIT /S %CDROM%\Software\Applications\Perfectdisk\perfectdisk.reg" /f

REG ADD %KEY%\013 /VE /D "Nero 6.0.0.13" /f
REG ADD %KEY%\013 /V 1 /D "%CDROM%\Software\Applications\Nero_Custom_Setup.exe" /f


rundll32.exe iernonce.dll,RunOnceExProcess
REG ADD %KEY% /V TITLE /D "Utilities" /f

REG ADD %KEY%\001 /VE /D "Crap Cleaner (Cab)" /f

REG ADD %KEY%\002 /VE /D "Spybot S&D (Cab)" /f

REG ADD %KEY%\003 /VE /D "Kazaa mega codec pack" /f
REG ADD %KEY%\003 /V 1 /D "%CDROM%\Software\Utilities\klmcodec138.exe /silent" /f

REG ADD %KEY%\004 /VE /D "Azureus 2.3.0.4" /f
REG ADD %KEY%\004 /V 1 /D "%CDROM%\Software\Applications\Azureus_2.3.0.4_Win32.setup.exe /S /D=C:\Program\Azureus" /f

REG ADD %KEY%\005 /VE /D "VLC Player." /f
REG ADD %KEY%\005 /V 1 /D "%CDROM%\Software\Applications\vlc-0.8.2-win32.exe /S" /f

REG ADD %KEY%\006 /VE /D "**** NFO Viewer" /f
REG ADD %KEY%\006 /V 1 /D "%CDROM%\Software\Applications\Damnnfo\DAMNNFO.sfx.exe" /f
REG ADD %KEY%\006 /V 2 /D "REGEDIT /S %CDROM%\Software\Applications\Damnnfo\****.reg" /f

REG ADD %KEY%\007 /VE /D "Tune-Up 2006" /f
REG ADD %KEY%\007 /V 1 /D "%CDROM%\Software\Applications\Tuneup\TU2006TrialEN.exe /q" /f
REG ADD %KEY%\007 /V 2 /D "REGEDIT /S %CDROM%\Software\Applications\Tuneup\tuneup.reg" /f

REG ADD %KEY%\008 /VE /D "WinRAR" /f
REG ADD %KEY%\008 /V 1 /D "%CDROM%\Software\Applications\wrar35b7.exe /s" /f

REG ADD %KEY%\009 /VE /D "7-Zip" /f
REG ADD %KEY%\009 /V 1 /D "%CDROM%\Software\Applications\7z423.exe /S" /f

REG ADD %KEY%\011 /VE /D "AVG 7.1 (Anti-Virus)" /f
REG ADD %KEY%\011 /V 1 /D "%systemdrive%\Install\Applications\Avg7\AvgSetup.bat" /f

REG ADD %KEY%\012 /VE /D "CPL Mouse Fix" /f
REG ADD %KEY%\012 /V 1 /D "REGEDIT /S %CDROM%\Software\mouse_fix.reg" /f

REG ADD %KEY%\012 /VE /D "HashTab v1.7 (Cab)" /f

REG ADD %KEY%\099 /VE /D "Cleaning Up and Rebooting" /f
REG ADD %KEY%\099 /V 1 /D "%CDROM%\Software\cleanup.cmd" /f

EXIT

Posted

Essentially this is correct but /VE is just a heading...if you want it to do something you have to tell it what to do.

REG ADD adds the commands to the registry and the rundll32 command runs them and deletes the registry entries...

If you want to see how it works just run mine...you'll just get a whole lot of errors saying it can't fine the files...but this will show you how it works...

I just counted...I have 7 lists.

Posted

I know that the /ve is just a name, is so i know what Cabs i have installing.

One list installs prior to first login... and the 2nd at 1st login.

It runs when my cab installers are being installed. Any idea why?

Posted

OrcoXP,

i just downloaded ur runonceex, very impressive!!! i might actually change the setup on mine now, my question is if you have noticed any performance issues during the install w/ it be ran 7 different times?

Posted (edited)

ORSI:

thats exactly what this script is for, the problem is that it is executed during the 12min setup part, no after the 1st logon

Are you running it from the GUIRUNONCE section in your WINNT.SIF, which will execute at first logon.. it sounds like you are running from the cmdlines.txt???

Edited by drscouse
Posted
ORSI:
thats exactly what this script is for, the problem is that it is executed during the 12min setup part, no after the 1st logon

Are you running it from the GUIRUNONCE section in your WINNT.SIF, which will execute at first logon.. it sounds like you are running from the cmdlines.txt???

I am running it with a cmdlines, i would add it under GUIRUNONCE in my winnt.sif?

Posted (edited)

If you want your installs to happen on first logon (after OS install is complete), you will need to execute the runonceex.cmd from GUIRUNONCE in your WINNT.SIF.

This is a section from my .sif file.

[Networking]InstallDefaultComponents=No

[RegionalSettings]

Language=00000809

LanguageGroup=1

[TapiLocation]

CountryCode=44

AreaCode=023

[GuiRunOnce]

"%windir%\system32\RunOnceEx.cmd"

[NetProtocols]

MS_TCPIP=params.MS_TCPIP

[NetAdapters]

Adapter1=params.Adapter1

[params.Adapter1]

ConnectionName="ADSL Router"

NetCardAddress=xxxxxxxxxxxx

Ive just checked out www.unattended.msfn.org "runonceex.cmd" section http://www.unattended.msfn.org/intermediat...s/runonceex.htm which indeed does describe its use in the cmdlines.txt.

Im sure this has all changed, cos when I was first starting this project, I did not learn to add it here (cmdlines.txt), and have always used it from GUIRUNONCE. Im not sure if there is a difference, but it has always worked fine for me. Remember if you chose to do it this way, to remove it from cmdlines.txt!

I would be interested to know of any pros/cons of doing it either way....

Edited by drscouse
  • 1 month later...
Posted

The reason it's running at T-12 stage is because of the line:

rundll32.exe iernonce.dll,RunOnceExProcess

cmdlines.txt gets run at T-12 stage which means the RunOnceEx.cmd is run at this stage. Normally this just inserts the reg entries ready to be run after first login but the rundll32.exe command forces these entries to get run straight away.

I hope this explains why you are getting this behaviour (sorry it's a little late).

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...