Jump to content

RunOnceEx list too long


Recommended Posts

Hello,

I have a problem with my RunOnceEx list because it's too long and it exits from the screen (40+ programs).

Is there a way to fix this? For example using another column or decrease spaces and fonts?

Screenshot attached

Thanks

post-130686-1177352410_thumb.jpg

Edited by phaolo
Link to comment
Share on other sites


I'm going back a bit here but here's a snip from an old RunOnceEx process I used to use.

Basically, I set everything up the most common way via cmdlines.txt but the only RunOnceEx command I had was to launch a second batch at boot time this batch sort of read like this:

@echo off
cmdow @ /HID

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:\DVD.ICO SET CDROM=%%i:

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

REG ADD %KEY% /V TITLE /D "System Updates" /f
REG ADD %KEY%10 /VE /D ".NET Framework 1.1 SP1" /f
REG ADD %KEY%10 /V 1 /D "%CDROM%\Software\System\DotNetFramwork11.exe" /f
REG ADD %KEY%15 /VE /D ".NET Framework 2.0" /f
REG ADD %KEY%15 /V 1 /D "%CDROM%\Software\System\DotNetFramwork20.exe" /f
REG ADD %KEY%20 /VE /D "Java Runtimes 5.0 Update 6" /f
REG ADD %KEY%20 /V 1 /D "%CDROM%\Software\System\JavaRuntimes50u6.exe" /f

rundll32.exe iernonce.dll,RunOnceExProcess

REG ADD %KEY%25 /VE /D "UPX Shell 3.2.1.2007" /f
REG ADD %KEY%25 /V 1 /D "%CDROM%\Software\Compression\UPXShell_321_2007.exe /SILENT /SP-" /f
REG ADD %KEY%30 /VE /D "WinRAR 3.51" /f
REG ADD %KEY%30 /V 1 /D "%CDROM%\Software\Compression\WinRAR351_Setup.exe /s" /f
REG ADD %KEY%30 /V 2 /D "regedt32 /s %CDROM%\Software\Compression\WinRAR351_Settings.reg" /f

rundll32.exe iernonce.dll,RunOnceExProcess

...

Whats happening here is, the reg entries are being written to the registry then executed using this command:

rundll32.exe iernonce.dll,RunOnceExProcess

Every time it's executed your batch has to pause until it's time to add the next set of reg entries then it starts all over again. This includes creating a new RunOnceEx window.

This is exactly the same process used by WPI in the old days when you specified how many apps you wanted displayed per RunOnceEx window.

Hope this helps.

Link to comment
Share on other sites

Oh, thanks for the answers.

Rundll32.exe method seems the one I need :thumbup

Just a little thing: I'd like to add a fake entry to signal that the list continues; is there a way to avoid an empty null.bat? I don't think that I can avoid the second line

reg add %KEY%21 /VE /D "continue..." /f

reg add %KEY%21 /V 1 /D "%CDROM%\Apps\null.bat" /f

rundll32.exe iernonce.dll,RunOnceExProcess

Edited by phaolo
Link to comment
Share on other sites

No! There's a problem!

The list is divided in many sub-lists as I wanted, but now RunOnceEx is launched While windows is still registering components! That could be messy and besides of that I cannot use ctrl-alt-canc in case of Autoit errors (so all blocks)

Maybe I have to use more RunOnceExes?

post-130686-1177519760_thumb.jpg

Edited by phaolo
Link to comment
Share on other sites

I use inf's now for all this but the principle is still the same.

Create a batch that runs at T-12 via cmdlines.txt that just adds one RunOnceEx command which executes your main install batch.

cmdlines.txt batch:

@echo off
cmdow @ /HID

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:\DVD.ICO SET CDROM=%%i:

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

REG ADD %KEY% /V TITLE /D "Windows Update" /f
REG ADD %KEY%10 /VE /D "Installing Software" /f
REG ADD %KEY%10 /V 1 /D "%CDROM%\Install.cmd" /f

Then your main batch file, Install.cmd in my example, would consist of something like I showed you earlier.

I have an old topic around here somewhere that explains this whole lot better, I'll try to find it.

Edit: Found it here.

Edited by kof94
Link to comment
Share on other sites

Thanks kof94 for the suggestions.

Now I'd like to try another metod though.

I'll use multiple RunOnceEx which call each other.

I've only a doubt about $OEM path. It's like %SYSTEMDRIVE% right?

last lines of RunOnceEx01.cmd:

-----

rem ##call to another RunOnceEx (needed to break the list in more parts)

reg add %KEY%85 /VE /D "continue... (1/4 completed)" /f

reg add %KEY%85 /V 1 /D "%SYSTEMDRIVE%\RunOnceEx02.cmd" /f

rem ##execute current RunOnceEx (keep at the end!)

rundll32.exe iernonce.dll,RunOnceExProcess

EXIT

---

Link to comment
Share on other sites

You'll need to go back and read the Unattended XP site again for your $OEM$ paths i.e. which $ folder equates to which system folder. I'd do it for you but it'll probably do you good to read the whole thing.

%SYSTEMDRIVE% is the variable for the root of the drive you have Windows installed on, commonly C: . If you fire up command prompt and type set it'll show you all the current variables.

The batch I showed you set's a variable for your CD\DVD drive and installs all your programs from there instead of messing about with $OEM$ folders. Again all this is on the Unattended XP site, but it's totally up to you how you want to do it.

Happy reading and good luck ;)

Edited by kof94
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...