Jump to content

Pause or Wait command/switch for RunOnceEx.cmd


Recommended Posts

Hello all,

Currently I am designing my unattended install and am using the RunOnceEx.cmd method to install apps.

Is there a way to tell runonceex.cmd to wait for say 60 secs before it goes onto install the next piece of software?

The reason is, I have Java VM starting to install AFTER Microsoft .NET Infrastructure.

Now I am assuming that runonceex.cmd thinks that the program install for .NET has finished and starts to execute the install for Java, but then I get a message on the screen saying

"Another application is still installing, please wait for it to finish"

Is there a way to let >NET finish what ever it is doing in the back ground before the install of Java starts?

thanks very much for your help.

Link to comment
Share on other sites


Do you have this to start your cmd, this tell it to start then wait for whatever to be finished.

Start /Wait What_Ever_Drive:\What_Ever_Location\What_Ever.exe

or

Start /W What_Ever_Drive:\What_Ever_Location\What_Ever.exe

If you want something just to pause then restart after X amount of time

red text is the amount of time the script pauses for

ping -n 60 127.0.0.1>nul
Link to comment
Share on other sites

Welcome to MSFN,

It would be helpful to know what commands you are using for these 2 installations. I do not think a 60 secs of wait is needed.

Here are the lines of code in my RunOnceEx.cmd file:

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 "Installing Applications" /f

REG ADD %KEY%\005 /VE /D "Adobe Reader 7" /f

REG ADD %KEY%\005 /V 1 /D "%CDROM%\Software\AdobeReader7\AR7.exe /S /v/qn" /f

REG ADD %KEY%\037 /VE /D "IsoBuster 1.9" /f

REG ADD %KEY%\037 /V 1 /D "%CDROM%\Software\IsoBuster19.exe /VERYSILENT /SP-" /f

REG ADD %KEY%\037 /V 2 /D "taskkill /F /IM isobuster.exe" /f

REG ADD %KEY%\053 /VE /D ".NET Framework 1.1" /f

REG ADD %KEY%\053 /V 1 /D "%CDROM%\Software\dotnet\dotnetinstall.exe" /f

REG ADD %KEY%\065 /VE /D "Sun Java 1.4.2" /f

REG ADD %KEY%\065 /V 1 /D "%CDROM%\Software\jre-1_5_0_04-windows-i586-p.exe /s /v/qn" /f

REG ADD %KEY%\065 /V 2 /D "REGEDIT /S %CDROM%\Software\RemoveSunJavaUpdateCheck.reg" /f

REG ADD %KEY%\075 /VE /D "WinRAR 3.51" /f

REG ADD %KEY%\075 /V 1 /D "%CDROM%\Software\Wrar351.exe /s" /f

REG ADD %KEY%\080 /VE /D "Installing Office 2003" /f

REG ADD %KEY%\080 /V 1 /D "%CDROM%\Software\Office2003\setuppro.exe TRANSFORMS=Unattended.MST /qb-" /f

REG ADD %KEY%\085 /VE /D "Adding Users" /f

REG ADD %KEY%\085 /V 1 /D "%CDROM%\Software\useraccounts.cmd" /f

REG ADD %KEY%\090 /VE /D "Installing Various Media Codecs" /f

REG ADD %KEY%\090 /V 1 /D "%CDROM%\Software\codecs.cmd" /f

REG ADD %KEY%\150 /VE /D "Cleaning Up and Rebooting" /f

REG ADD %KEY%\150 /V 1 /D "%CDROM%\Software\cleanup.cmd" /f

EXIT

Link to comment
Share on other sites

Do you have this to start your cmd, this tell it to start then wait for whatever to be finished.
Start /Wait What_Ever_Drive:\What_Ever_Location\What_Ever.exe

or

Start /W What_Ever_Drive:\What_Ever_Location\What_Ever.exe

If you want something just to pause then restart after X amount of time

red text is the amount of time the script pauses for

ping -n 60 127.0.0.1>nul

Hi there,

So where does this exactly go in the RunOnceEx.cmd file?

Link to comment
Share on other sites

REG ADD %KEY%\053 /VE /D ".NET Framework 1.1" /f

REG ADD %KEY%\053 /V 1 /D "%CDROM%\Software\dotnet\dotnetinstall.exe" /f

REG ADD %KEY%\065 /VE /D "Sun Java 1.4.2" /f

REG ADD %KEY%\065 /V 1 /D "%CDROM%\Software\jre-1_5_0_04-windows-i586-p.exe /s /v/qn" /f

REG ADD %KEY%\065 /V 2 /D "REGEDIT /S %CDROM%\Software\RemoveSunJavaUpdateCheck.reg" /f

REG ADD %KEY%\075 /VE /D "WinRAR 3.51" /f

REG ADD %KEY%\075 /V 1 /D "%CDROM%\Software\Wrar351.exe /s" /f

No switches are shown for .Net Framework.

Since you have WinRAR in your list, I could assume you have repacked .Net with also patched with SP1. Below is the comment I used for my WinRAR SFX. RunOnceEx does wait for the end of installation

;The comment below contains SFX script commands

Setup=Netfx.msi /qb /norestart
TempMode
Silent=2
Overwrite=1

If you want to use GSM's idea then it would look like below:

REG ADD %KEY%\053 /VE /D ".NET Framework 1.1" /f
REG ADD %KEY%\053 /V 1 /D "%CDROM%\Software\dotnet\dotnetinstall.exe" /f
REG ADD %KEY%\053 /V 2 /D "ping -n 60 127.0.0.1>nul" /f

REG ADD %KEY%\065 /VE /D "Sun Java 1.4.2" /f
REG ADD %KEY%\065 /V 1 /D "%CDROM%\Software\jre-1_5_0_04-windows-i586-p.exe /s /v/qn" /f
REG ADD %KEY%\065 /V 2 /D "REGEDIT /S %CDROM%\Software\RemoveSunJavaUpdateCheck.reg" /f

Link to comment
Share on other sites

If you want to use GSM's idea then it would look like below:

REG ADD %KEY%\053 /VE /D ".NET Framework 1.1" /f
REG ADD %KEY%\053 /V 1 /D "%CDROM%\Software\dotnet\dotnetinstall.exe" /f
REG ADD %KEY%\053 /V 2 /D "ping -n 60 127.0.0.1>nul" /f

REG ADD %KEY%\065 /VE /D "Sun Java 1.4.2" /f
REG ADD %KEY%\065 /V 1 /D "%CDROM%\Software\jre-1_5_0_04-windows-i586-p.exe /s /v/qn" /f
REG ADD %KEY%\065 /V 2 /D "REGEDIT /S %CDROM%\Software\RemoveSunJavaUpdateCheck.reg" /f

Hello MHz thank you very much for this pointer and I shall try it out....

Link to comment
Share on other sites

  • 1 year later...
There is a sleep utility. However, it would be much better, if there was a way to use start /wait from runonceex.

RunOnceEx does wait.

It did not for me. It was like when the WAIT switch has no effect in a batch file-which it seldom does- and all your executables run simultaneously to the point where finally the system finishes booting into windows with all of these setup prompts tiled on the desktop; what a mess! :wacko:

I was wandering if, aside from the "REG ADD %KEY%53 /V 2 /D "ping -n 60 127.0.0.1>nul" /f" solution, there is a "pause" instruction that stops the cmd's progress until "any key is pressed" type thing; similar to "pause" in a batch file?

Edited by RickSteele
Link to comment
Share on other sites

  • 3 months later...
Since you have WinRAR in your list, I could assume you have repacked .Net with also patched with SP1. Below is the comment I used for my WinRAR SFX. RunOnceEx does wait for the end of installation

;The comment below contains SFX script commands

Setup=Netfx.msi /qb /norestart
TempMode
Silent=2
Overwrite=1

Hi there,

you should use the introdution from MHz !

It's the easiest way to solve the problem. :thumbup

Here the Option for .NET 2 and 3

Setup=install.exe /q
TempMode
Silent=1
Overwrite=1

Greetz

Greenhorn

Link to comment
Share on other sites

  • 3 weeks later...
There is a sleep utility. However, it would be much better, if there was a way to use start /wait from runonceex.

RunOnceEx does wait.

It did not for me. It was like when the WAIT switch has no effect in a batch file-which it seldom does- and all your executables run simultaneously to the point where finally the system finishes booting into windows with all of these setup prompts tiled on the desktop; what a mess! :wacko:

I was wandering if, aside from the "REG ADD %KEY%53 /V 2 /D "ping -n 60 127.0.0.1>nul" /f" solution, there is a "pause" instruction that stops the cmd's progress until "any key is pressed" type thing; similar to "pause" in a batch file?

It's probably too late now, but all you have to do is call a batch file with PAUSE written in it from runonceex.cmd.

"REG ADD %KEY%53 /VE /D "Wait for ... to finish" /f"

"REG ADD %KEY%53 /V 1 /D "%systemdrive%\install\pause.cmd" /f"

pause.cmd consisting of purely PAUSE

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