Jump to content

Aborting runonceEx.cmd


Recommended Posts

I'm trying to make a .cmd or .bat or something that I can have runonceEx.cmd call in the 1st position.

Ideally this file will allow simple user input Yes/No to abort or skip the runonce process and continue into windows.

By the time it runs though it's too late to delete the reg entries that runonceEx.cmd made though right?

Any help is apreciated!

Link to comment
Share on other sites


No, i've got my unattended set up just the way I want it - but say I want to use the disc on my laptop which really doesn't need a whole video editing suite and all my other programs installed from runonce. I'm hoping for a simple fix like "Hit Y to proceed with program installs, hit N to skip"

Haha and yes, I realize with the amount of effort i've put into posting I could have easily switched over to WPI but that would be admiting defeat!

Link to comment
Share on other sites

You could use CHOICE.EXE in your runonceex.cmd.

:Retry
choice /c:YN /t:Y,60 Do you want to install applications
if errorlevel 2 goto SkipApps
if errorlevel 1 goto InstallApps
goto Retry

:InstallApps

REG ADD .....
etc

:SkipApps

Link to comment
Share on other sites

Try This At The Start Of The RunOnceEx.cmd

echo off
cls
mode 55,5
color 9f
set CD1=%systemdrive%\INSTALL\
echo.
echo Would You Like To Add The RunOnceEx.cmd
echo Type Yes To Add Type No To Quit
set /p Ques= Waiting For User Input :-^>
goto %Ques%

:Yes

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

REG ADD %KEY% /V TITLE /D "The Install Section" /f

REG ADD %KEY%\000 /VE /D "Preparing Installation..." /f
REG ADD %KEY%\015 /VE /D "Alcohol120" /f
REG ADD %KEY%\015 /V 1 /D "REGEDIT /S %CD1%Alcohol\TestAlcohol.reg" /f
REG ADD %KEY%\015 /V 2 /D "%CD1%Alcohol\setup.msi /qb/promtrestart" /f

REG ADD %KEY%\170 /VE /D "Preparing Final Clean up ..." /f
REG ADD %KEY%\170 /V 1 /D "%CD1%CleanUa.exe" /f

:NO
echo User Decided Not To Add The RunOnceEx.cmd
ping -n 2 127.0.0.1>nul
exit

Or You Could Have This Between Each Item That get Installed

echo.
echo Would You Like To Add The Alcohol120
echo Type Yes To Add Type No For Next
set /p Aloc= Waiting For User Input :-^>
goto %Aloc%

:Yes
REG ADD %KEY%\000 /VE /D "Preparing Installation..." /f
REG ADD %KEY%\015 /VE /D "Alcohol120" /f
REG ADD %KEY%\015 /V 1 /D "REGEDIT /S %CD1%Alcohol\TestAlcohol.reg" /f
REG ADD %KEY%\015 /V 2 /D "%CD1%Alcohol\setup.msi /qb/promtrestart" /f

:No
echo.
echo Would You Like To Add FlashPlayer7
echo Type Yes To Add Type No For Next
set /p Flsh= Waiting For User Input :-^>
goto %Flsh%

:Yes
REG ADD %KEY%\035 /VE /D "FlashPlayer7" /f
REG ADD %KEY%\035 /V 1 /D "%CD1%Flash\FlsPlyr7Inst.exe /s /v/qn" /f

:No
Next One ETC

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