From 9f25b1df9ca6d86afd1fe90cd0ddeca9d3c9d216 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Mon, 8 Mar 2021 10:44:15 +0100 Subject: [PATCH] some bugfixes and introduced new tool: setacl.exe --- scripts/autoconfig-all.cmd | 22 +++++++++++----------- scripts/delete-edgekeys.reg | Bin 33878 -> 0 bytes scripts/disable-accountpicture.cmd | 16 ++++++++++++---- scripts/settings.cmd | 2 +- scripts/uninstall-edge.cmd | 18 ++++++++++++++---- scripts/unpack-zipfiles.cmd | 6 ++++++ software/basic.csv | 1 + 7 files changed, 45 insertions(+), 20 deletions(-) delete mode 100644 scripts/delete-edgekeys.reg diff --git a/scripts/autoconfig-all.cmd b/scripts/autoconfig-all.cmd index c6b1bb0..60c8b94 100644 --- a/scripts/autoconfig-all.cmd +++ b/scripts/autoconfig-all.cmd @@ -15,23 +15,17 @@ date /t time /t echo. -echo loading settings ... -call settings.cmd -echo windows_updates=%windows_updates% -echo. -echo ++++++++++++++++++ - echo creating %T% ... mkdir %T% 1>nul 2>nul echo cd to %SCRIPTS% ... cd /D %SCRIPTS% -echo. -echo ####################### -echo ### GLOBAL settings ### -echo ####################### -echo. +echo loading settings ... +call settings.cmd +echo ++++++++++++++++++ +echo windows_updates=%windows_updates% +echo ++++++++++++++++++ rem 7-zip is essential for other scripts ... call unpack-7zip.cmd @@ -49,6 +43,12 @@ rem copy some other stuff ... call copy-exefiles.cmd echo. +echo. +echo ####################### +echo ### MODIFICATIONS ### +echo ####################### +echo. + rem this must be done EARLY! if %windows_updates% == 0 ( call disable-updates.cmd diff --git a/scripts/delete-edgekeys.reg b/scripts/delete-edgekeys.reg deleted file mode 100644 index cb4320e482c5919dda6a9513b7aba0afdc1e7b9e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 33878 zcmeI5Sx*~F7RT#(r1=h!-;H8c^Dqxy;09e1qCgUjh7kg6mcaqWI3e7t`RX(C|J89( zy#;Jm(^!`6?yl-`ou$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ieAKku5j!oj3oOrs1{nEw7yL{rjbnY>x##VpiLDxo zYn9qFcKkgbDOO}pvJ!bCrZTBDaY^WGZ|qA!*;jNRT{|0S_|m=Q2yZ?PhK(8iGZ33P z?i^mW*m=aln%1bvB%*!T*X5)1s@5#tM6$l4Y*C;{QOnh`k18HBk?j*j`OXvtL>`xs zy0)u-)HCIgQLn=vXp1}fpSn<^3CEU?PpQJCjs&ldO7p&7mDoY$iP1$Vgf8VN8QVRu zeAEp8!9X=Jx}}T|CTnBO|89E=o_}?;T9HYD8cXIi{vSvD&jH(~b6vFI8RDL^y&sbQ zOTs=rXFdl=OqrNs(JoSV+gmPJR6UJ}*AsW_`J~^$<0Ga;L<7%0+vhGji9YN@-jEbe{uAXC=VT)I@3T>Me#_(h|FWBCMgRZ+ diff --git a/scripts/disable-accountpicture.cmd b/scripts/disable-accountpicture.cmd index 15e6da0..e0a4653 100644 --- a/scripts/disable-accountpicture.cmd +++ b/scripts/disable-accountpicture.cmd @@ -2,11 +2,19 @@ set TARGET="%ALLUSERSPROFILE%\Microsoft\User Account Pictures" -rem empty logo (disables all logos on logon screen) -rem set LOGO=config\user-empty.png +rem default: empty logo (disables all logos on logon screen) +set LOGO=config\user-empty.png -rem windows logo taken from: http://pngimg.com/image/23601 -set LOGO=config\windows-logo.png +echo loading settings ... +call settings.cmd +echo ++++++++++++++++++ +echo logon_logo=%logon_logo% +echo ++++++++++++++++++ + +if %logon_logo% == 1 ( + rem windows logo taken from: http://pngimg.com/image/23601 + set LOGO=config\windows-logo.png +) echo ####### %0 ####### diff --git a/scripts/settings.cmd b/scripts/settings.cmd index 09ecc08..379f885 100644 --- a/scripts/settings.cmd +++ b/scripts/settings.cmd @@ -1,2 +1,2 @@ set windows_updates=1 - +set logon_logo=1 diff --git a/scripts/uninstall-edge.cmd b/scripts/uninstall-edge.cmd index b7e838e..57e01cc 100644 --- a/scripts/uninstall-edge.cmd +++ b/scripts/uninstall-edge.cmd @@ -27,10 +27,20 @@ reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EdgeUpdate" ^ /v "DoNotUpdateToEdgeWithChromium" /d 1 /t REG_DWORD /f echo. -echo ... and finally delete ALL edge registry keys -echo hoping that frankensteins monster cannot come back after this ... -regedit /S delete-edgekeys.reg -echo READY. +echo trying to remove stale entries from software list ... +for %%K in ( + + "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" + "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft Edge" + +) do ( + + echo %%K + SetACL.exe -on %%K -ot reg -actn setowner -ownr "n:Administrators" 1>nul 2>nul + SetACL.exe -on %%K -ot reg -actn ace -ace "n:Administrators;p:full" 1>nul 2>nul + reg delete %%K /f + +) echo. echo ####### %0 ####### diff --git a/scripts/unpack-zipfiles.cmd b/scripts/unpack-zipfiles.cmd index ea7f6e3..f77e974 100644 --- a/scripts/unpack-zipfiles.cmd +++ b/scripts/unpack-zipfiles.cmd @@ -20,6 +20,7 @@ for %%A in ( rclone regscanner restic + setacl vim winscp wub @@ -87,6 +88,11 @@ move /Y %T%\restic\*.exe %TOOLS%\restic.exe rd /S /Q %T%\restic echo. +echo Setacl +move /Y %T%\setacl\*.exe %TOOLS%\setacl.exe +rd /S /Q %T%\setacl +echo. + echo VIM move /Y %T%\vim\vim.exe %TOOLS% rd /S /Q %T%\vim diff --git a/software/basic.csv b/software/basic.csv index 54607de..a61bce4 100644 --- a/software/basic.csv +++ b/software/basic.csv @@ -22,3 +22,4 @@ https://www.nirsoft.net/utils/regscanner-x64.zip regscanner.zip http://www.drivesnapshot.de/download/snapshot64.exe snapshot64.exe https://ftp.halifax.rwth-aachen.de/videolan/vlc/3.0.12/win64/vlc-3.0.12-win64.exe vlc-setup.exe https://github.com/microsoft/terminal/releases/download/v1.5.10411.0/Microsoft.WindowsTerminal_1.5.10411.0_8wekyb3d8bbwe.msixbundle windowsterminal-setup.msixbundle +https://helgeklein.com/downloads/SetACL/current/SetACL%20(executable%20version).zip setacl.zip