From 76780465b8a7dfc10fe34c2f1f6f212a16e6fea3 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Tue, 31 Jan 2023 20:49:23 +0100 Subject: [PATCH] bugfix --- {scripts => optional}/block-updates.cmd | 3 ++ scripts/autoconfig-all.cmd | 38 ++++++++----------- scripts/startmenu/Windows Update Manager.lnk | Bin 0 -> 929 bytes 3 files changed, 18 insertions(+), 23 deletions(-) rename {scripts => optional}/block-updates.cmd (86%) create mode 100644 scripts/startmenu/Windows Update Manager.lnk diff --git a/scripts/block-updates.cmd b/optional/block-updates.cmd similarity index 86% rename from scripts/block-updates.cmd rename to optional/block-updates.cmd index b8a30df..c2486b4 100644 --- a/scripts/block-updates.cmd +++ b/optional/block-updates.cmd @@ -1,4 +1,6 @@ @echo off +call check-for-admin +if %ERRORLEVEL% neq 0 exit /b echo ####### %0 ####### @@ -14,4 +16,5 @@ echo showing HIDDEN windows updates ... powershell -command "Get-WindowsUpdate -IsHidden" echo ####### %0 ####### +pause diff --git a/scripts/autoconfig-all.cmd b/scripts/autoconfig-all.cmd index 4fdc8e6..3490989 100644 --- a/scripts/autoconfig-all.cmd +++ b/scripts/autoconfig-all.cmd @@ -73,28 +73,28 @@ rem 7-zip is essential for other scripts ... call unpack-7zip.cmd echo. -rem windows update blocker is in the zipfiles ... -call unpack-zipfiles.cmd -echo. - -rem unpack powershell packages and register them ... -call unpack-pspackages.cmd -echo. - rem put vnc in place ... call unpack-vnc.cmd echo. +rem unpack all the other zipfiles ... +call unpack-zipfiles.cmd +echo. + rem copy some other stuff ... call copy-executables.cmd echo. +rem unpack powershell packages and register them ... +call unpack-pspackages.cmd +echo. + echo ####################### echo ### MODIFICATIONS ### echo ####################### echo. -rem this must be done EARLY! +rem block updates - this must be done EARLY! if %windows_updates% == 0 ( call disable-updates.cmd echo. @@ -205,20 +205,6 @@ echo. powershell -command .\disable-soundscheme.ps1 echo. -echo ##################### -echo ### UPDATES tasks ### -echo ##################### -echo. - -rem enable updates again ... -if %windows_updates% == 1 ( - call enable-updates.cmd - echo. -) - -call block-updates.cmd -echo. - echo ##################### echo ### CLEANUP tasks ### echo ##################### @@ -252,6 +238,12 @@ echo removing read-only flag on tools folder ... attrib /S /D -R %TOOLS%\* echo. +rem enable updates again (doing it as late as possible) ... +if %windows_updates% == 1 ( + call enable-updates.cmd + echo. +) + date /t time /t echo ####### %0 ####### diff --git a/scripts/startmenu/Windows Update Manager.lnk b/scripts/startmenu/Windows Update Manager.lnk new file mode 100644 index 0000000000000000000000000000000000000000..580f6b380585970c2a419df18cf7ef9c49d6ecf1 GIT binary patch literal 929 zcmah{UuaTc6#r=pT*Y$CVzp`(6V^YcQ4dMtLQ@0b3L_J`4-04OwySr{IeqA%$A%lD zpg$0ktz4^RR1c%4Lc-^=z{-m1p@Irod+R0WoNFo@Lg(Xm&i9?~_nklY9v=XWK}#CQ zsT%GZ(7{Oi{jRZ|KM#tUsq@8K*+V7GotGaRcv#e6VXey4RQNUh9tL#!KMMup51XXF z`BsO$7R&S&^f+x|ja1+GVO0gXeW3H+X!3-+k*ra4}tI35Uwpu`SfH@O3?u&5d-zDwk6h!A+DL0xI)+a z5F6yz!3i6^sI&Sj`DTJ-S;oTAIDdnxxVt{4F>du`I)eF~U2~t< GUzNYksKMa? literal 0 HcmV?d00001