From 674d8736e9f2d5727b1a6c9167d9733207938ff3 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Wed, 8 Feb 2023 16:12:23 +0100 Subject: [PATCH] bugfixing + actvation killing --- optional/destroy-activation.cmd | 40 +++++++++++++++++++++++++ optional/uninstall-telemetry.cmd | 2 +- scripts/autoconfig-all.cmd | 3 ++ scripts/cleanup-programlist.cmd | 2 +- scripts/disable-accountpicture.cmd | 2 +- scripts/disable-automaticactivation.cmd | 12 ++++++++ scripts/install-git.cmd | 10 ++----- scripts/modify-explorer.cmd | 6 ++-- scripts/modify-taskbar.cmd | 8 ++--- scripts/modify-timeservers.cmd | 14 ++++----- scripts/modify-windowsupdate.cmd | 4 +-- scripts/uninstall-edge.cmd | 2 +- scripts/uninstall-onedrive.cmd | 2 +- scripts/uninstall-pchealth.cmd | 2 +- tools/logon.cmd | 5 ++++ 15 files changed, 84 insertions(+), 30 deletions(-) create mode 100644 optional/destroy-activation.cmd create mode 100644 scripts/disable-automaticactivation.cmd diff --git a/optional/destroy-activation.cmd b/optional/destroy-activation.cmd new file mode 100644 index 0000000..03028d6 --- /dev/null +++ b/optional/destroy-activation.cmd @@ -0,0 +1,40 @@ +@echo off +call check-for-admin + +echo ####### %0 ####### + +echo. +echo WARNING: executing this script may cripple some important functions in windows! +echo especially the ACTIVATION APP and SERVICE will not work anymore! + +set answer= +:ask + set /p answer="REALLY remove Windows Activation (Y/N)? " + if /i "%answer:~,1%" EQU "Y" ( + GOTO CONT + ) + if /i "%answer:~,1%" EQU "N" ( + echo ABORTED. + exit /b + ) + echo Please type Y or N. + goto ask +:CONT + +echo Disabling and removing sppsvc service +nsudo /U:T /P:E sc stop sppsvc +nsudo /U:T /P:E sc delete sppsvc + +echo Hiding activation menu in windows settings app ... +reg add "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies\Explorer" ^ +/v SettingsPageVisibility /t REG_SZ /D "hide:activation" /f + +echo Removing KMS packages with DISM +dism /online /quiet /remove-package /PackageName:Microsoft-Windows-ServerMgmt-ActivationKMS-Package~31bf3856ad364e35~amd64~~10.0.0.0 + +echo Removing the missing activation watermark on desktop (System) ... +bcdedit /set TESTSIGNING OFF + +echo. +echo ####### %0 ####### +pause diff --git a/optional/uninstall-telemetry.cmd b/optional/uninstall-telemetry.cmd index 30f40db..05334fe 100644 --- a/optional/uninstall-telemetry.cmd +++ b/optional/uninstall-telemetry.cmd @@ -8,7 +8,7 @@ rem THANKS! echo. echo WARNING: executing this script may cripple some important functions in windows! -echo especially the store app will not work anymore - and it will be removed by this script! +echo especially the STORE APP will not work anymore - and it will be removed by this script! echo. echo WARNING: system will be REBOOTED after modify! diff --git a/scripts/autoconfig-all.cmd b/scripts/autoconfig-all.cmd index 3e2216a..b7c1571 100644 --- a/scripts/autoconfig-all.cmd +++ b/scripts/autoconfig-all.cmd @@ -190,6 +190,9 @@ echo ### DISABLE tasks ### echo ##################### echo. +call disable-automaticactivation.cmd +echo. + call disable-accountpicture.cmd echo. diff --git a/scripts/cleanup-programlist.cmd b/scripts/cleanup-programlist.cmd index c25f9e2..1f725ae 100644 --- a/scripts/cleanup-programlist.cmd +++ b/scripts/cleanup-programlist.cmd @@ -12,7 +12,7 @@ for %%K in ( ) do ( echo deleting registry key [ %%K ] using NSUDO ... - nsudo -U:T -P:E reg delete %%K /f + nsudo /U:T /P:E reg delete %%K /f ) diff --git a/scripts/disable-accountpicture.cmd b/scripts/disable-accountpicture.cmd index 77f07fe..dd63c26 100644 --- a/scripts/disable-accountpicture.cmd +++ b/scripts/disable-accountpicture.cmd @@ -53,7 +53,7 @@ for %%F in ( ) reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" ^ - /v UseDefaultTile /t REG_DWORD /d 1 /f 2>nul + /v UseDefaultTile /t REG_DWORD /d 1 /f echo ####### %0 ####### diff --git a/scripts/disable-automaticactivation.cmd b/scripts/disable-automaticactivation.cmd new file mode 100644 index 0000000..e3d73a1 --- /dev/null +++ b/scripts/disable-automaticactivation.cmd @@ -0,0 +1,12 @@ +@echo off + +echo ####### %0 ####### + +echo disabling automatic activation and notification ... +reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" ^ + /v Manual /t REG_DWORD /d 1 /f +reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform\Activation" ^ + /v NotificationDisabled /t REG_DWORD /d 1 /f + +echo ####### %0 ####### + diff --git a/scripts/install-git.cmd b/scripts/install-git.cmd index bb67e0b..4e6e046 100644 --- a/scripts/install-git.cmd +++ b/scripts/install-git.cmd @@ -20,16 +20,10 @@ echo installing GIT ... echo setting GIT_EDITOR variable (all users) ... reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ^ - /v GIT_EDITOR ^ - /t REG_EXPAND_SZ ^ - /d "%TOOLS%\vim.exe" ^ - /f + /v GIT_EDITOR /t REG_EXPAND_SZ /d "%TOOLS%\vim.exe" /f echo setting GIT_SSH variable (all users) ... reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ^ - /v GIT_SSH ^ - /t REG_EXPAND_SZ ^ - /d "%TOOLS%\usr\bin\ssh.exe" ^ - /f + /v GIT_SSH /t REG_EXPAND_SZ /d "%TOOLS%\usr\bin\ssh.exe" /f echo ####### %0 ####### diff --git a/scripts/modify-explorer.cmd b/scripts/modify-explorer.cmd index a52563f..fb4bba7 100644 --- a/scripts/modify-explorer.cmd +++ b/scripts/modify-explorer.cmd @@ -34,16 +34,16 @@ echo. if %explorer_quick_access% == 0 ( echo disabling explorer quick access ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" ^ - /v "HubMode" /t REG_DWORD /d 1 /f 2>nul + /v "HubMode" /t REG_DWORD /d 1 /f ) else ( echo enabling explorer quick access ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" ^ - /v "HubMode" /t REG_DWORD /d 0 /f 2>nul + /v "HubMode" /t REG_DWORD /d 0 /f ) echo disabling network icon ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\NonEnum" ^ - /v "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /t REG_DWORD /d 1 /f 1>nul + /v "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" /t REG_DWORD /d 1 /f echo removing 3d Objects ... reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" /f 2>nul diff --git a/scripts/modify-taskbar.cmd b/scripts/modify-taskbar.cmd index 80e9f5d..c68c5b8 100644 --- a/scripts/modify-taskbar.cmd +++ b/scripts/modify-taskbar.cmd @@ -4,11 +4,11 @@ echo ####### %0 ####### echo disabling windows ink completely ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsInkWorkspace" ^ - /v "AllowWindowsInkWorkspace" /t REG_DWORD /d 0 /f 1>nul + /v "AllowWindowsInkWorkspace" /t REG_DWORD /d 0 /f echo remove store icon from taskbar ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer" ^ - /v "NoPinningStoreToTaskbar" /t REG_DWORD /d 1 /f 1>nul + /v "NoPinningStoreToTaskbar" /t REG_DWORD /d 1 /f echo remove defender icon from systray ... reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" ^ @@ -17,11 +17,11 @@ taskkill /f /im SecurityHealthSystray.exe 1>nul 2>nul echo disabling autotray for the taskbar ... reg add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer" ^ - /v "EnableAutoTray" /t REG_DWORD /d 0 /f 1>nul + /v "EnableAutoTray" /t REG_DWORD /d 0 /f echo disabling notification center ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Explorer" ^ - /v "DisableNotificationCenter" /t REG_DWORD /d 1 /f 1>nul + /v "DisableNotificationCenter" /t REG_DWORD /d 1 /f echo restarting explorer ... taskkill /f /im explorer.exe 1>nul 2>nul diff --git a/scripts/modify-timeservers.cmd b/scripts/modify-timeservers.cmd index f97b4ad..2ccb160 100644 --- a/scripts/modify-timeservers.cmd +++ b/scripts/modify-timeservers.cmd @@ -4,27 +4,27 @@ echo ####### %0 ####### echo adding PTB time servers ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^ - /v "1" /t REG_SZ /d "ptbtime1.ptb.de" /f 1>nul + /v "1" /t REG_SZ /d "ptbtime1.ptb.de" /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^ - /v "2" /t REG_SZ /d "ptbtime2.ptb.de" /f 1>nul + /v "2" /t REG_SZ /d "ptbtime2.ptb.de" /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^ - /v "3" /t REG_SZ /d "ptbtime3.ptb.de" /f 1>nul + /v "3" /t REG_SZ /d "ptbtime3.ptb.de" /f echo adding EUROPE ntp pool servers ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^ - /v "4" /t REG_SZ /d "0.europe.pool.ntp.org" /f 1>nul + /v "4" /t REG_SZ /d "0.europe.pool.ntp.org" /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^ - /v "5" /t REG_SZ /d "1.europe.pool.ntp.org" /f 1>nul + /v "5" /t REG_SZ /d "1.europe.pool.ntp.org" /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^ - /v "6" /t REG_SZ /d "2.europe.pool.ntp.org" /f 1>nul + /v "6" /t REG_SZ /d "2.europe.pool.ntp.org" /f reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DateTime\Servers" ^ - /v "7" /t REG_SZ /d "3.europe.pool.ntp.org" /f 1>nul + /v "7" /t REG_SZ /d "3.europe.pool.ntp.org" /f echo stopping time service ... diff --git a/scripts/modify-windowsupdate.cmd b/scripts/modify-windowsupdate.cmd index 0e69cbe..13fc943 100644 --- a/scripts/modify-windowsupdate.cmd +++ b/scripts/modify-windowsupdate.cmd @@ -37,9 +37,9 @@ if %windows_targetrelease% == 0 ( echo setting windows update target release ... reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" ^ - /v TargetReleaseVersion /t REG_DWORD /d 1 /f 2>nul + /v TargetReleaseVersion /t REG_DWORD /d 1 /f reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" ^ - /v TargetReleaseVersionInfo /t REG_SZ /d %windows_targetrelease% /f 2>nul + /v TargetReleaseVersionInfo /t REG_SZ /d %windows_targetrelease% /f ) diff --git a/scripts/uninstall-edge.cmd b/scripts/uninstall-edge.cmd index 448a009..1bac627 100644 --- a/scripts/uninstall-edge.cmd +++ b/scripts/uninstall-edge.cmd @@ -46,7 +46,7 @@ powershell -Command "Get-ScheduledTask | Where-Object {$_.Taskname -match 'EdgeU echo BLOCKING further edge updates ... reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EdgeUpdate" ^ - /v "DoNotUpdateToEdgeWithChromium" /d 1 /t REG_DWORD /f 1>nul 2>&1 + /v "DoNotUpdateToEdgeWithChromium" /d 1 /t REG_DWORD /f echo REMOVING active setup registry key ... reg delete "HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{9459C573-B17A-45AE-9F64-1857B5D58CEE}" /f > NUL 2>&1 diff --git a/scripts/uninstall-onedrive.cmd b/scripts/uninstall-onedrive.cmd index 3863a71..85cacff 100644 --- a/scripts/uninstall-onedrive.cmd +++ b/scripts/uninstall-onedrive.cmd @@ -38,7 +38,7 @@ echo KILLING all OneDrive SETUP instances ... taskkill /f /im OneDriveSetup.exe > NUL 2>&1 echo removing OneDrive setup exe and dll ... -nsudo -U:T -P:E cmd.exe /C del /F /Q "%SYSTEMROOT%\SysWOW64\*onedrive*" 2>nul +nsudo /U:T /P:E cmd.exe /C del /F /Q "%SYSTEMROOT%\SysWOW64\*onedrive*" 2>nul echo ####### %0 ####### diff --git a/scripts/uninstall-pchealth.cmd b/scripts/uninstall-pchealth.cmd index 064e3bd..e080ba7 100644 --- a/scripts/uninstall-pchealth.cmd +++ b/scripts/uninstall-pchealth.cmd @@ -7,7 +7,7 @@ if EXIST "%ProgramFiles%\Microsoft Update Health Tools" ( sc delete uhssvc echo removing PC health update folder ... - nsudo -U:T -P:E cmd.exe /C rd /S /Q "%ProgramFiles%\Microsoft Update Health Tools" 2>nul + nsudo /U:T /P:E cmd.exe /C rd /S /Q "%ProgramFiles%\Microsoft Update Health Tools" 2>nul ) if NOT exist "%ProgramFiles%\PCHealthCheck\PCHealthCheck.exe" ( diff --git a/tools/logon.cmd b/tools/logon.cmd index a3af93e..fc3e490 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -458,6 +458,11 @@ rd /S /Q %STARTMENU%\"Maintenance" 2>nul rd /S /Q %STARTMENU%\"System Tools" 2>nul rd /S /Q %STARTMENU%\"Windows Powershell" 2>nul +rem get rid of activation messages ... +echo Removing the missing activation watermark on desktop (User) ... +reg add "HKEY_CURRENT_USER\Control Panel\Desktop" ^ +/v PaintDesktopVersion /t REG_DWORD /D 0 /f + rem ... stupid OS! rem IE is such a zombie. I's coming back all the time ... echo Removing IE link in users start menu ...