From d6d9ad83f6b794cfe3aeff78584b4cdd660c278f Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sat, 14 Jan 2023 14:55:58 +0100 Subject: [PATCH] removed setacl, sdio and vivetool --- scripts/cleanup-programlist.cmd | 6 +- scripts/startmenu/SDIO.lnk | Bin 1124 -> 0 bytes scripts/uninstall-onedrive.cmd | 3 +- scripts/unpack-zipfiles.cmd | 21 ---- software/basic.csv | 2 - software/other.csv | 1 - tools/logon.cmd | 189 +++++++++++++++++--------------- 7 files changed, 106 insertions(+), 116 deletions(-) delete mode 100644 scripts/startmenu/SDIO.lnk diff --git a/scripts/cleanup-programlist.cmd b/scripts/cleanup-programlist.cmd index 7049bc8..c25f9e2 100644 --- a/scripts/cleanup-programlist.cmd +++ b/scripts/cleanup-programlist.cmd @@ -11,10 +11,8 @@ for %%K in ( ) do ( - echo %%K - setacl -on %%K -ot reg -actn setowner -ownr "n:Administrators" 1>nul 2>nul - setacl -on %%K -ot reg -actn ace -ace "n:Administrators;p:full" 1>nul 2>nul - reg delete %%K /f + echo deleting registry key [ %%K ] using NSUDO ... + nsudo -U:T -P:E reg delete %%K /f ) diff --git a/scripts/startmenu/SDIO.lnk b/scripts/startmenu/SDIO.lnk deleted file mode 100644 index 9d455dbe4fc348aa0f2fcae466f5c6aa16e465a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1124 zcma)5Ur3Wt6#vbHw7)YgY-xT3vz0ctTFRu+Vlx%2&zzs_;UkT0)ndBARt@^|kOV3A zWIc>%NLdEegF$A*#77^5W<_Wi3DHX;OTy@(htB!jpE9DIkKeubobTM{Xst9Gxb7EZh zQtMUUoz6pr!Ek3Qs%*7#+9|VWhEY+X(uar|A-~@j!~x_Z7m2Zm^za1R_2jWn@!Fi( zsI2C9h7p3FJ|BW)DZxlVpf$$)`tm+l4RprBQz>Y?UXh#^;FwxwC z8k)_}!$UR??I|Hh$(earHxXD`3B`m}ge7s}5}$G0+vWCO2!b-JBu?h*%1V^sYEyel zjmfO{go#;8hv*^yF=o;xr>`t$5$1Z>D53IiY0vEMSPpQ&Ni)lNPuDpvOG?~J8uiQ2 zRcnv=(dyp*xstZYk<*&%3k5ev!xwv>zJ2w-|D%+Zd|==R5gHxMjs-*Py$wC}LqFn$ zgTYffxRu;|SQ&vcl&Ylw-CtqvVn>n}1ST^qYM&?SHR}6|IURk``N#XozJ?u`Y!e}y z5^{rXB*4l;;-~U-*tm{$UZma)AD_!crsuzhsM`Y6$6mN_lG4jP*hO~Uw1J>drd}WG zodgd2!C9Bia_e=$vv(L5XNu$eF1ND-GYf=&7c85C69I{tz=sWQ>9jw&5oj1{u<8db g;l5I`pJ9gvLeoTf_vgvA;=QVo%2HR`Znmf77x2XD5C8xG diff --git a/scripts/uninstall-onedrive.cmd b/scripts/uninstall-onedrive.cmd index a8f4719..8da2265 100644 --- a/scripts/uninstall-onedrive.cmd +++ b/scripts/uninstall-onedrive.cmd @@ -39,8 +39,7 @@ echo KILLING all OneDrive SETUP instances ... taskkill /f /im OneDriveSetup.exe > NUL 2>&1 echo removing OneDrive setup exe ... -setacl -on %OneDrive% -ot file -actn setowner -ownr "n:Administrators" 1>nul 2>nul -setacl -on %OneDrive% -ot file -actn ace -ace "n:Administrators;p:full" 1>nul 2>nul +icacls %OneDrive% /grant Users:F 2>nul del /F %OneDrive% 2>nul echo ####### %0 ####### diff --git a/scripts/unpack-zipfiles.cmd b/scripts/unpack-zipfiles.cmd index d003a50..273c4bf 100644 --- a/scripts/unpack-zipfiles.cmd +++ b/scripts/unpack-zipfiles.cmd @@ -22,14 +22,11 @@ for %%A in ( registryfinder regscanner restic - sdio - setacl serviwin showkeyplus trid triddefs vim - vivetool wget wgetdeps winscp @@ -108,23 +105,11 @@ move /Y %T%\restic\*.exe %TOOLS%\restic.exe rd /S /Q %T%\restic echo. -echo Snappy Driver Installer Origin (SDIO) -mkdir %TOOLS%\sdio 2>nul -move /Y %T%\sdio\SDIO_x64_R749.exe %TOOLS%\sdio -move /Y %T%\sdio\"SDIO Reference Manual.pdf" %TOOLS%\sdio -rd /S /Q %T%\sdio -echo. - echo ServiWIN move /Y %T%\serviwin\*.exe %TOOLS% rd /S /Q %T%\serviwin echo. -echo SetACL -move /Y %T%\setacl\*.exe %TOOLS% -rd /S /Q %T%\setacl -echo. - echo ShowKeyPlus move /Y %T%\showkeyplus\*.exe %TOOLS% rd /S /Q %T%\showkeyplus @@ -147,12 +132,6 @@ rem create symbolic link ... mklink %TOOLS%\vi.exe %TOOLS%\vim.exe 2>nul echo. -echo ViveTool -move /Y %T%\vivetool\vivetool.exe %TOOLS% -move /Y %T%\vivetool\*.dll %TOOLS% -rd /S /Q %T%\vivetool -echo. - echo wGET move /Y %T%\wget\wget.exe %TOOLS% rd /S /Q %T%\wget diff --git a/software/basic.csv b/software/basic.csv index 0edea5c..c4f587c 100644 --- a/software/basic.csv +++ b/software/basic.csv @@ -23,7 +23,6 @@ https://www.nirsoft.net/utils/regscanner-x64.zip regscanner.zip https://github.com/pbatard/rufus/releases/download/v3.13/rufus-3.13p.exe rufus.exe http://www.drivesnapshot.de/download/snapshot64.exe snapshot64.exe https://github.com/Superfly-Inc/ShowKeyPlus/releases/download/ShowKeyPlus1.1.16.0/ShowKeyPlus1.1.16.0_x64.zip showkeyplus.zip -https://github.com/thebookisclosed/ViVe/releases/download/v0.2.1/ViVeTool-v0.2.1.zip vivetool.zip https://win32diskimager.org/wp-content/uploads/win32diskimager-1.0.0-install.exe win32diskimager.exe https://ftp.halifax.rwth-aachen.de/videolan/vlc/3.0.12/win64/vlc-3.0.12-win64.exe vlc-setup.exe https://www.heidoc.net/php/Windows-ISO-Downloader.exe Windows-ISO-Downloader.exe @@ -32,7 +31,6 @@ https://www.inveigle.net/downloads/CMail_0.8.3_amd64.zip cmail.zip https://github.com/M2Team/NSudo/releases/download/8.2/NSudo_8.2_All_Components.zip nsudo.zip https://www.nirsoft.net/utils/serviwin-x64.zip serviwin.zip https://www.nirsoft.net/utils/devmanview-x64.zip devmanview.zip -https://www.glenn.delahoy.com/downloads/sdio/SDIO_1.12.9.749.zip sdio.zip https://registry-finder.com/bin/2.55.0.0/RegistryFinder64.zip registryfinder.zip https://mark0.net/download/trid_w32.zip trid.zip https://mark0.net/download/triddefs.zip triddefs.zip diff --git a/software/other.csv b/software/other.csv index e772594..1c10761 100644 --- a/software/other.csv +++ b/software/other.csv @@ -1,4 +1,3 @@ -dummy setacl.zip dummy citrixworkspace-setup.exe dummy nsepa_setup.exe dummy xojo-setup.exe diff --git a/tools/logon.cmd b/tools/logon.cmd index 63bed46..0098b49 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -27,8 +27,8 @@ set emclient_license=0 set seafile_domain=0 set install_aerolite=0 -echo ####### %0 ####### +echo ####### %0 ####### rem =================== rem CONFIGFILE CHECKS @@ -53,43 +53,16 @@ if NOT EXIST %COMPANY_SETTINGS% ( call %COMPANY_SETTINGS% ) -echo. -echo ##### -echo ##### GENERIC tasks -echo ##### -echo. - -rem =================== -rem EMCLIENT LICENSING -rem =================== - -rem licensing for emClient already done ? -if EXIST %EMLICENSE_DONE% GOTO EMCLIENT_END - -if %emclient_license% == 0 ( - echo no emClient license found! -) else ( - echo. - if EXIST "%ProgramFiles(x86)%\eM Client\MailClient.exe" ( - echo Adding emClient license ... - "%ProgramFiles(x86)%\eM Client\MailClient.exe" /activate %emclient_license% - - rem create a statusfile (this codeblock must be executed only once per use) ... - echo 1 >%EMLICENSE_DONE% - - ) else ( - echo emClient is NOT installed! - ) - echo. -) - -:EMCLIENT_END - - rem ================================================ rem GENERIC SETTINGS FOR THE USER (this runs always) rem ================================================ +echo. +echo ##### +echo ##### GENERIC tasks and settings +echo ##### +echo. + echo Removing the wallpaper ... reg add "HKCU\Control Panel\Desktop" /v WallPaper /t REG_SZ /d " " /f 1>nul RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters @@ -121,6 +94,34 @@ if EXIST %USERPROFILE%\Seafile ( attrib -S %USERPROFILE%\Seafile /S /D ) + +rem =================== +rem EMCLIENT LICENSING +rem =================== + +rem licensing for emClient already done ? +if EXIST %EMLICENSE_DONE% GOTO EMCLIENT_END + +if %emclient_license% == 0 ( + echo no emClient license found! +) else ( + echo. + if EXIST "%ProgramFiles(x86)%\eM Client\MailClient.exe" ( + echo Adding emClient license ... + "%ProgramFiles(x86)%\eM Client\MailClient.exe" /activate %emclient_license% + + rem create a statusfile (this codeblock must be executed only once per use) ... + echo 1 >%EMLICENSE_DONE% + + ) else ( + echo emClient is NOT installed! + ) + echo. +) + +:EMCLIENT_END + + rem ===================================================== rem ACCOUNT TWEAKS AND CONFIG FILES (this runs only once) rem ===================================================== @@ -134,6 +135,32 @@ echo ##### INITIAL account setup echo ##### echo. +rem =============== +rem ONLY FOR ADMINS +rem =============== + +isuseradmin +if %ERRORLEVEL% == 0 ( + + echo Disabling unwanted NETWORK features ... + call %TOOLS%\scripts\disable-networkfeatures.cmd 1>nul 2>nul + + echo Cleaning up tiles in the START menu ... + call %TOOLS%\scripts\cleanup-tiles.cmd 1>nul 2>nul + + rem ... stupid OS! + rem why the heck is the Startmenu entry for "System Tools" installed per user ? stupid Microsoft. + echo Moving system tools links ... + move /Y %STARTMENU%\"System Tools\*.*" ^ + %STARTMENU_PUBLIC%\"System Tools" 1>nul 2>nul + + rem Removing and renaming objects in the "System Tools" folder... + move /Y %STARTMENU_PUBLIC%\"System Tools\computer.lnk" ^ + %STARTMENU_PUBLIC%\"System Tools\This PC.lnk" 1>nul 2>nul + del /F %STARTMENU_PUBLIC%\"System Tools\Command Prompt.lnk" 2>nul + +) + rem WORKSPACE folder echo Creating folder %USERPROFILE%\workspace ... mkdir %USERPROFILE%\workspace 1>nul 2>nul @@ -246,18 +273,6 @@ if %install_aerolite% == 1 ( echo. ) -rem =============== -rem ONLY FOR ADMINS -rem =============== - -isuseradmin -if %ERRORLEVEL% == 0 ( - echo Disabling unwanted NETWORK features ... - call %TOOLS%\scripts\disable-networkfeatures.cmd 1>nul 2>nul - echo Cleaning up tiles in the START menu ... - call %TOOLS%\scripts\cleanup-tiles.cmd 1>nul 2>nul -) - echo. echo preparing the SEAFILE configuration echo ######################################## @@ -282,36 +297,6 @@ echo reorganizing start menu and desktop echo ######################################## echo. -rem ... stupid OS problem #4 -rem why the heck are "System Tools" installed per user ? stupid Microsoft. -echo Moving system tools links ... -move /Y %STARTMENU%\"System Tools\*.*" ^ - %STARTMENU_PUBLIC%\"System Tools" 1>nul 2>nul - -rem Removing and renaming some start menu stuff ... -move /Y %STARTMENU_PUBLIC%\"System Tools\computer.lnk" ^ - %STARTMENU_PUBLIC%\"System Tools\This PC.lnk" 1>nul 2>nul -del /F %STARTMENU_PUBLIC%\"System Tools\Command Prompt.lnk" 2>nul - -rem ... stupid OS problem #5 -rem same here for the accessibility tools. WHY ? stupid Microsoft. -echo Moving accessibility tools to accessories folder ... -move /Y %STARTMENU%\"Accessibility\*.*" ^ - %STARTMENU_PUBLIC%\"Accessories" 2>nul - -echo Removing public accessibility tools folder ... -rd /S /Q %STARTMENU_PUBLIC%\Accessibility 2>nul - -rem ... stupid OS problem #6 -rem Edge is such a zombie! -echo Removing microsoft edge links in start menu and desktop ... -del /F %STARTMENU%\"Microsoft Edge.lnk" 2>nul -del /F %USERPROFILE%\"Desktop\Microsoft Edge.lnk" 2>nul - -rem IE too! -echo Removing IE link in start menu ... -del /F %STARTMENU%\"Accessories\Internet Explorer.lnk" 2>nul - rem Onedrive ... echo Removing OneDrive link in start menu ... del /F %APPDATA%\"Microsoft\Windows\Start Menu\Programs\OneDrive.lnk" @@ -346,24 +331,43 @@ rem =============== isuseradmin if %ERRORLEVEL% == 0 ( + echo. call %TOOLS%\scripts\uninstall-onedrive.cmd + echo. call %TOOLS%\scripts\uninstall-edge.cmd + echo. call %TOOLS%\scripts\uninstall-pchealth.cmd + + rem ... stupid OS! + rem why the heck is the Startmenu entry for "Accessibility Tools" installed per user ? stupid Microsoft. + rem must be done (here) more than once, because Microsoft patches can reinstall some tools ... + echo. + echo Moving accessibility tools to accessories folder ... + move /Y %STARTMENU%\"Accessibility\*.*" ^ + %STARTMENU_PUBLIC%\Accessories 2>nul + + move /Y %STARTMENU_PUBLIC%\"Accessibility\*.*" ^ + %STARTMENU_PUBLIC%\Accessories 2>nul + + echo Removing public accessibility tools folder ... + rd /S /Q %STARTMENU_PUBLIC%\Accessibility 2>nul + +) else ( + + echo Removing accessibility tools folder ... + rd /S /Q %STARTMENU%\Accessibility 2>nul + + echo Removing users accessories folder ... + rd /S /Q %STARTMENU%\Accessories 2>nul + + echo Removing users system tools folder ... + rd /S /Q %STARTMENU%\"System Tools" 2>nul + ) -echo. -echo Cleaning user settings -echo ######################################## -echo. - -rem ... stupid OS problem #7 -rem Rewards ? Really ? Seriously ? -echo Disabling the nag screen in windows settings ... -%TOOLS%\vivetool delconfig 18299130 1 - echo. echo Cleaning users home directory echo ######################################## @@ -409,9 +413,22 @@ echo Other tasks and fixes for the user echo ######################################## echo. +rem ... stupid OS! +rem IE is such a zombie. I's coming back all the time ... +echo Removing IE link in users start menu ... +del /F %STARTMENU%\"Accessories\Internet Explorer.lnk" 2>nul + +rem ... stupid OS! +rem Edge is a zombie too! +echo Removing microsoft edge links in start menu and desktop ... +del /F %STARTMENU%\"Microsoft Edge.lnk" 2>nul +del /F %USERPROFILE%\"Desktop\Microsoft Edge.lnk" 2>nul + +rem re-create "Pictures" in case it was deleted ... echo Creating "Pictures" folder for snipping tool ... mkdir %USERPROFILE%\Pictures 2>nul +rem workstation service should run always ... echo Starting the workstation service ... net start workstation 1>nul 2>nul net config workstation