diff --git a/scripts/autoconfig-all.cmd b/scripts/autoconfig-all.cmd index 06d4dec..835becb 100644 --- a/scripts/autoconfig-all.cmd +++ b/scripts/autoconfig-all.cmd @@ -247,6 +247,9 @@ echo. rem ... remove stupid public folders call cleanup-publicdir.cmd +rem ... remove ALL tasks from the scheduler +call cleanup-taskscheduler.cmd + date /t time /t echo ####### %0 ####### diff --git a/scripts/cleanup-startmenu.cmd b/scripts/cleanup-startmenu.cmd index d28d5d5..b7af287 100644 --- a/scripts/cleanup-startmenu.cmd +++ b/scripts/cleanup-startmenu.cmd @@ -16,7 +16,7 @@ ping 127.0.0.1 -n 3 >nul 2>nul echo cleanup TempState directories and reset cache ... del %LOCALAPPDATA%\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\TempState\* /q del %LOCALAPPDATA%\Packages\Microsoft.Windows.ShellExperienceHost_cw5n1h2txyewy\TempState\* /q -REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\StateStore" /V ResetCache /T REG_DWORD /D 1 /F +reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ImmersiveShell\StateStore" /V ResetCache /T REG_DWORD /D 1 /F echo removing useless entries in startmenu ... rd /S /Q %STARTMENU%\"Go Programming Language" 2>nul diff --git a/scripts/cleanup-taskscheduler.cmd b/scripts/cleanup-taskscheduler.cmd new file mode 100644 index 0000000..d164cf7 --- /dev/null +++ b/scripts/cleanup-taskscheduler.cmd @@ -0,0 +1,19 @@ +@echo off + +echo ####### %0 ####### + +echo removing all tasks in the task scheduler ... + +rem using a command ... +schtasks /delete /TN * /F + +rem file system ... +rd /S /Q %SystemRoot%\system32\Tasks +mkdir %SystemRoot%\system32\Tasks + +rem regsitry ... +reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tasks" /f +reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft" /f + +echo ####### %0 ####### + diff --git a/wim/packages-to-remove.csv b/wim/packages-to-remove.csv new file mode 100644 index 0000000..ddb0948 --- /dev/null +++ b/wim/packages-to-remove.csv @@ -0,0 +1,37 @@ +Microsoft-Windows-MediaPlayer-Package~31bf3856ad364e35~amd64~~10.0.19041.488 +Microsoft-OneCore-ApplicationModel-Sync-Desktop-FOD-Package~31bf3856ad364e35~amd64~~10.0.19041.488 +Microsoft-OneCore-DirectX-Database-FOD-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.508 +Microsoft-Windows-Hello-Face-Package~31bf3856ad364e35~amd64~~10.0.19041.508 +Microsoft-Windows-InternetExplorer-Optional-Package~31bf3856ad364e35~amd64~~11.0.19041.1 +Microsoft-Windows-LanguageFeatures-Handwriting-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-LanguageFeatures-OCR-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-LanguageFeatures-Speech-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-LanguageFeatures-TextToSpeech-en-us-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-MSPaint-FoD-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.1 +Microsoft-Windows-MSPaint-FoD-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-MSPaint-FoD-Package~31bf3856ad364e35~wow64~en-US~10.0.19041.1 +Microsoft-Windows-Notepad-FoD-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.488 +Microsoft-Windows-Notepad-FoD-Package~31bf3856ad364e35~amd64~~10.0.19041.488 +Microsoft-Windows-Notepad-FoD-Package~31bf3856ad364e35~wow64~en-US~10.0.19041.1 +Microsoft-Windows-Notepad-FoD-Package~31bf3856ad364e35~wow64~~10.0.19041.1 +Microsoft-Windows-PowerShell-ISE-FOD-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.1 +Microsoft-Windows-PowerShell-ISE-FOD-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-PowerShell-ISE-FOD-Package~31bf3856ad364e35~wow64~en-US~10.0.19041.1 +Microsoft-Windows-PowerShell-ISE-FOD-Package~31bf3856ad364e35~wow64~~10.0.19041.1 +Microsoft-Windows-Printing-PMCPPC-FoD-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.1 +Microsoft-Windows-Printing-PMCPPC-FoD-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-Printing-WFS-FoD-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.488 +Microsoft-Windows-Printing-WFS-FoD-Package~31bf3856ad364e35~amd64~~10.0.19041.508 +Microsoft-Windows-QuickAssist-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-StepsRecorder-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.1 +Microsoft-Windows-StepsRecorder-Package~31bf3856ad364e35~amd64~~10.0.19041.1 +Microsoft-Windows-StepsRecorder-Package~31bf3856ad364e35~wow64~en-US~10.0.19041.1 +Microsoft-Windows-StepsRecorder-Package~31bf3856ad364e35~wow64~~10.0.19041.1 +Microsoft-Windows-TabletPCMath-Package~31bf3856ad364e35~amd64~~10.0.19041.488 +Microsoft-Windows-UserExperience-Desktop-Package~31bf3856ad364e35~amd64~~10.0.19041.488 +Microsoft-Windows-WordPad-FoD-Package~31bf3856ad364e35~amd64~en-US~10.0.19041.1 +Microsoft-Windows-WordPad-FoD-Package~31bf3856ad364e35~amd64~~10.0.19041.488 +Microsoft-Windows-WordPad-FoD-Package~31bf3856ad364e35~wow64~en-US~10.0.19041.1 +Microsoft-Windows-WordPad-FoD-Package~31bf3856ad364e35~wow64~~10.0.19041.1 +OpenSSH-Client-Package~31bf3856ad364e35~amd64~~10.0.19041.488 diff --git a/wim/remove-packages.cmd b/wim/remove-packages.cmd new file mode 100644 index 0000000..c4bc09f --- /dev/null +++ b/wim/remove-packages.cmd @@ -0,0 +1,19 @@ +@echo off +set IMAGE=c:\TEMP\IMAGE + +echo exporting PACKAGES list BEFORE doing any changes ... +dism /Image:%IMAGE% /Get-Packages 1>Packages-BEFORE.txt + +FOR /F %%P in (packages-to-remove.csv) do ( + + echo removing package [ %%P ] + dism /Image:%IMAGE% /Remove-Package /PackageName:"%%P" + +) + +echo exporting remaining PACKAGES list ... +dism /Image:%IMAGE% /Get-Packages 1>Packages-AFTER.txt + +rem showing packages ... +dir Packages*.txt +