I have several batch files that I use for Programs cleanups, backups, etc.
I have to set User Account Control’s to “Never Notify” before the batch files will run.
Is there a way to insert a command in the batch files, let the file run, and then reset the User Account Control back to the top?
I now have to set the control to “Never Notify”, run the batch files, then reboot to change the control back for protection.
My Master Batch file to run the other batch files is:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
MODE CON: COLS=80 LINES=45
@echo off
cls
goto begin
This Menu controls LRBATCH.BAT, BACKUP.BAT, CLEANUP.BAT and RESTORE.BAT files.
:begin
cls
echo.
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ
echo ÛÛÛÛÛÛÛÛÛÛ === Preventative Maintenance === ÛÛÛÛÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛ 1 – Rejuvenate (Clean) Computer ÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛ 2 – Backup Computer ÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛ 3 – Restore Computer ÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ±±
echo ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ±±
echo ±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±
echo Enter Selection Number, or Press ESC to Quit:
:getchoice
choose
if errorlevel 27 goto end
if errorlevel 5 goto getchoice
if errorlevel 3 goto choice3
if errorlevel 2 goto choice2
:choice1
cls
echo Choice #1
c:CleanUp.bat
cls
:choice2
cls
echo Choice #2
c:BackUp.bat
:choice3
cls
echo Choice #3
c:Restore.bat
:end
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
I run my computer as Administrator. W7 32bit