From de9700e31ff5ba29cd38ff3f5ece7028850d30aa Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Sun, 10 Jan 2021 18:45:55 +0100 Subject: [PATCH] . --- CustomSetup.cmd | 4 +- PrepareStick.cmd | 2 +- scripts/cleanup-startmenu.cmd | 48 ++++++------ scripts/cleanup-tiles.ps1 | 126 +++++++++++++++--------------- scripts/disable-autologon.cmd | 22 +++--- scripts/install-antivir.cmd | 22 +++--- scripts/install-desktopicons.cmd | 24 +++--- scripts/install-firefox.cmd | 128 +++++++++++++++---------------- scripts/install-git.cmd | 32 ++++---- scripts/install-git.txt | 46 +++++------ scripts/install-logonscript.cmd | 56 +++++++------- scripts/install-openshell.cmd | 44 +++++------ scripts/install-powertweaks.cmd | 18 ++--- scripts/install-tweaks.cmd | 28 +++---- scripts/uninstall-apps.ps1 | 32 ++++---- scripts/uninstall-edge.cmd | 26 ++++--- scripts/uninstall-onedrive.cmd | 66 ++++++++-------- 17 files changed, 363 insertions(+), 361 deletions(-) diff --git a/CustomSetup.cmd b/CustomSetup.cmd index 103ffa8..ef74148 100644 --- a/CustomSetup.cmd +++ b/CustomSetup.cmd @@ -100,7 +100,7 @@ powershell -Command ^ echo. rem uninstall some Apps (but keep the store) ... -powershell uninstall-apps.ps1 +powershell -Command .\uninstall-apps.ps1 echo setting PATH variable (all users) ... reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ^ @@ -111,7 +111,7 @@ reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Env echo cleanup startmenu ... call cleanup-startmenu.cmd -powershell -Command cleanup-tiles.ps1 +powershell -Command .\cleanup-tiles.ps1 rem install openshell (fuck you microsoft) ... call install-openshell.cmd diff --git a/PrepareStick.cmd b/PrepareStick.cmd index 1f054d2..ef47ba7 100644 --- a/PrepareStick.cmd +++ b/PrepareStick.cmd @@ -54,7 +54,7 @@ if EXIST %SOURCES%\install_FINAL.esd ( for %%P in (tools software scripts) do ( if EXIST %%P ( - rd /S /Q %USBDRIVE%\%%P + rd /S /Q %USBDRIVE%\%%P 1>nul 2>nul echo copying folder %%P to drive %USBDRIVE% ... robocopy %%P %USBDRIVE%\%%P /MIR /256 /NJH /NFL /NDL ) diff --git a/scripts/cleanup-startmenu.cmd b/scripts/cleanup-startmenu.cmd index a5480ba..0029fdc 100644 --- a/scripts/cleanup-startmenu.cmd +++ b/scripts/cleanup-startmenu.cmd @@ -1,24 +1,24 @@ -@echo off - -echo ####### %0 ####### - -rem kill system processes and wait a short time ... -taskkill /f /im StartMenuExperienceHost.exe -taskkill /f /im shellexperiencehost.exe -taskkill /f /im explorer.exe - -ping 127.0.0.1 -n 3 >nul 2>nul - -rem kill dead entries in start menu and kill old live tiles ... -@echo on -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 -@echo off - -rem start explorer again ... -ping 127.0.0.1 -n 1 >nul 2>nul -start explorer - -echo ####### %0 ####### - +@echo off + +echo ####### %0 ####### + +rem kill system processes and wait a short time ... +taskkill /f /im StartMenuExperienceHost.exe +taskkill /f /im shellexperiencehost.exe +taskkill /f /im explorer.exe + +ping 127.0.0.1 -n 3 >nul 2>nul + +rem kill dead entries in start menu and kill old live tiles ... +@echo on +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 +@echo off + +rem start explorer again ... +ping 127.0.0.1 -n 1 >nul 2>nul +start explorer + +echo ####### %0 ####### + diff --git a/scripts/cleanup-tiles.ps1 b/scripts/cleanup-tiles.ps1 index 0dd30f0..1ff5256 100644 --- a/scripts/cleanup-tiles.ps1 +++ b/scripts/cleanup-tiles.ps1 @@ -1,63 +1,63 @@ -# -# this script loads a tile layout for the -# start menu with NO tiles at all! -# ( = deletes all tiles ) -# - -$LAYOUT='C:\Windows\StartLayout.xml' - -write-host '#######',(split-path $PSCommandPath -Leaf),'#######' - -echo "delete layout file if it already exists ..." -If(Test-Path $LAYOUT) { - Remove-Item $LAYOUT -} - -echo "create a blank layout file [ $LAYOUT ] ..." -echo "" > $LAYOUT -echo " " >> $LAYOUT -echo " " >> $LAYOUT -echo " " >> $LAYOUT -echo " " >> $LAYOUT -echo " " >> $LAYOUT -echo " " >> $LAYOUT -echo "" >> $LAYOUT - -$regAliases = @("HKLM", "HKCU") - -# assign the start layout and force it to apply with -# "LockedStartLayout" at both the machine and user level ... -echo "assign the start layout AND apply it ..." -foreach ($regAlias in $regAliases) { - $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows" - $keyPath = $basePath + "\Explorer" - IF(!(Test-Path -Path $keyPath)) { - New-Item -Path $basePath -Name "Explorer" - } - Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 1 - Set-ItemProperty -Path $keyPath -Name "StartLayoutFile" -Value "$LAYOUT" -} - -# restart Explorer, open the start menu (necessary to load the new layout), -# and give it a few seconds to process ... -Start-Sleep -s 3 -echo "restart explorer ..." -Stop-Process -name explorer -Start-Sleep -s 3 -$wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}') -Start-Sleep -s 3 - -# enable the ability to pin items again by disabling "LockedStartLayout" ... -foreach ($regAlias in $regAliases) { - $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows" - $keyPath = $basePath + "\Explorer" - Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 0 -} - -# restart Explorer and delete the layout file ... -echo "restart explorer ..." -Stop-Process -name explorer -Remove-Item $LAYOUT - -write-host '#######',(split-path $PSCommandPath -Leaf),'#######' - +# +# this script loads a tile layout for the +# start menu with NO tiles at all! +# ( = deletes all tiles ) +# + +$LAYOUT='C:\Windows\StartLayout.xml' + +write-host '#######',(split-path $PSCommandPath -Leaf),'#######' + +echo "delete layout file if it already exists ..." +If(Test-Path $LAYOUT) { + Remove-Item $LAYOUT +} + +echo "create a blank layout file [ $LAYOUT ] ..." +echo "" > $LAYOUT +echo " " >> $LAYOUT +echo " " >> $LAYOUT +echo " " >> $LAYOUT +echo " " >> $LAYOUT +echo " " >> $LAYOUT +echo " " >> $LAYOUT +echo "" >> $LAYOUT + +$regAliases = @("HKLM", "HKCU") + +# assign the start layout and force it to apply with +# "LockedStartLayout" at both the machine and user level ... +echo "assign the start layout AND apply it ..." +foreach ($regAlias in $regAliases) { + $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows" + $keyPath = $basePath + "\Explorer" + IF(!(Test-Path -Path $keyPath)) { + New-Item -Path $basePath -Name "Explorer" + } + Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 1 + Set-ItemProperty -Path $keyPath -Name "StartLayoutFile" -Value "$LAYOUT" +} + +# restart Explorer, open the start menu (necessary to load the new layout), +# and give it a few seconds to process ... +Start-Sleep -s 3 +echo "restart explorer ..." +Stop-Process -name explorer +Start-Sleep -s 3 +$wshell = New-Object -ComObject wscript.shell; $wshell.SendKeys('^{ESCAPE}') +Start-Sleep -s 3 + +# enable the ability to pin items again by disabling "LockedStartLayout" ... +foreach ($regAlias in $regAliases) { + $basePath = $regAlias + ":\SOFTWARE\Policies\Microsoft\Windows" + $keyPath = $basePath + "\Explorer" + Set-ItemProperty -Path $keyPath -Name "LockedStartLayout" -Value 0 +} + +# restart Explorer and delete the layout file ... +echo "restart explorer ..." +Stop-Process -name explorer +Remove-Item $LAYOUT + +write-host '#######',(split-path $PSCommandPath -Leaf),'#######' + diff --git a/scripts/disable-autologon.cmd b/scripts/disable-autologon.cmd index 8e41e4f..ef2feee 100644 --- a/scripts/disable-autologon.cmd +++ b/scripts/disable-autologon.cmd @@ -1,11 +1,11 @@ -@echo off - -echo ####### %0 ####### - -echo disabling autologon for admin ... -reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /f -reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f -reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /f - -echo ####### %0 ####### - +@echo off + +echo ####### %0 ####### + +echo disabling autologon for admin ... +reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /f +reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword /f +reg delete "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName /f + +echo ####### %0 ####### + diff --git a/scripts/install-antivir.cmd b/scripts/install-antivir.cmd index 0c34ae6..f9923ce 100644 --- a/scripts/install-antivir.cmd +++ b/scripts/install-antivir.cmd @@ -1,11 +1,11 @@ -@echo off - -set EXE=..\software\F-SecureNetworkInstaller-AV_AVTR20F930_.exe - -echo ####### %0 ####### - -echo installing F-Secure Antivirus ... -%EXE% --silent - -echo ####### %0 ####### - +@echo off + +set EXE=..\software\F-SecureNetworkInstaller-AV_AVTR20F930_.exe + +echo ####### %0 ####### + +echo installing F-Secure Antivirus ... +%EXE% --silent + +echo ####### %0 ####### + diff --git a/scripts/install-desktopicons.cmd b/scripts/install-desktopicons.cmd index ed75c7d..4356b2f 100644 --- a/scripts/install-desktopicons.cmd +++ b/scripts/install-desktopicons.cmd @@ -1,12 +1,12 @@ -@echo off - -set SOURCE=icons -set TARGET=c:\Users\Public\Desktop - -echo ####### %0 ####### - -echo copying desktop icons ... -xcopy /CDI /HERBY %SOURCE% %TARGET% - -echo ####### %0 ####### - +@echo off + +set SOURCE=icons +set TARGET=c:\Users\Public\Desktop + +echo ####### %0 ####### + +echo copying desktop icons ... +xcopy /CDI /HERBY %SOURCE% %TARGET% + +echo ####### %0 ####### + diff --git a/scripts/install-firefox.cmd b/scripts/install-firefox.cmd index cc8ed9b..5b3afd1 100644 --- a/scripts/install-firefox.cmd +++ b/scripts/install-firefox.cmd @@ -1,64 +1,64 @@ -@echo off - -set CONF=deploy\firefox -set SCRIPTS=..\..\scripts -set SOFTWARE=..\software\firefox - -set MSI=Firefox_Setup_83.0b9.msi -set FIREFOXBASE="C:\Program Files\Mozilla Firefox" - -set BADGERFILE=%SOFTWARE%\privacy_badger-2020.12.10.xpi -set BADGERTARGET=jid1-MnnxcxisBPnSXQ@jetpack.xpi - -set UBLOCKFILE=%SOFTWARE%\ublock_origin-1.32.0.xpi -set UBLOCKTARGET=uBlock0@raymondhill.net.xpi - -set PASSWORD1FILE=%SOFTWARE%\1password-1.22.3.xpi -set PASSWORD1TARGET={d634138d-c276-4fc8-924b-40a0ea21d284}.xpi - -set BITWARDENFILE=%SOFTWARE%\bitwarden-1.47.1.xpi -set BITWARDENTARGET={446900e4-71c2-419f-a6a7-df9c091e268b}.xpi - -echo ####### %0 ####### - -cd %SOFTWARE% -@echo on -msiexec /i %MSI% /passive -@echo off -cd %SCRIPTS% - -rem copy config ... -copy /Y %CONF%\local-settings.js %FIREFOXBASE%\defaults\pref -copy /Y %CONF%\mozilla.cfg %FIREFOXBASE% - -echo disabling FireFox updates (all users) ... -reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox" ^ - /v DisableAppUpdate ^ - /t REG_DWORD ^ - /d 1 ^ - /f - -echo enabling FireFox Bookmarks-bar for all users ... -reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox" ^ - /v DisplayBookmarksToolbar ^ - /t REG_DWORD ^ - /d 1 ^ - /f - -echo creating extensions directory ... -mkdir %FIREFOXBASE%\distribution\extensions 1>nul 2>nul - -echo installing badger(eff) to fight internet bullshit ... -copy /Y %BADGERFILE% %FIREFOXBASE%\distribution\extensions\%BADGERTARGET% - -echo installing uBlock to fight even more internet bullshit ... -copy /Y %UBLOCKFILE% %FIREFOXBASE%\distribution\extensions\%UBLOCKTARGET% - -echo installing 1Password plugin ... -copy /Y %PASSWORD1FILE% %FIREFOXBASE%\distribution\extensions\%PASSWORD1TARGET% - -echo installing Bitwarden plugin ... -copy /Y %BITWARDENFILE% %FIREFOXBASE%\distribution\extensions\%BITWARDENTARGET% - -echo ####### %0 ####### - +@echo off + +set CONF=deploy\firefox +set SCRIPTS=..\..\scripts +set SOFTWARE=..\software\firefox + +set MSI=Firefox_Setup_83.0b9.msi +set FIREFOXBASE="C:\Program Files\Mozilla Firefox" + +set BADGERFILE=%SOFTWARE%\privacy_badger-2020.12.10.xpi +set BADGERTARGET=jid1-MnnxcxisBPnSXQ@jetpack.xpi + +set UBLOCKFILE=%SOFTWARE%\ublock_origin-1.32.0.xpi +set UBLOCKTARGET=uBlock0@raymondhill.net.xpi + +set PASSWORD1FILE=%SOFTWARE%\1password-1.22.3.xpi +set PASSWORD1TARGET={d634138d-c276-4fc8-924b-40a0ea21d284}.xpi + +set BITWARDENFILE=%SOFTWARE%\bitwarden-1.47.1.xpi +set BITWARDENTARGET={446900e4-71c2-419f-a6a7-df9c091e268b}.xpi + +echo ####### %0 ####### + +cd %SOFTWARE% +@echo on +msiexec /i %MSI% /passive +@echo off +cd %SCRIPTS% + +rem copy config ... +copy /Y %CONF%\local-settings.js %FIREFOXBASE%\defaults\pref +copy /Y %CONF%\mozilla.cfg %FIREFOXBASE% + +echo disabling FireFox updates (all users) ... +reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox" ^ + /v DisableAppUpdate ^ + /t REG_DWORD ^ + /d 1 ^ + /f + +echo enabling FireFox Bookmarks-bar for all users ... +reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Mozilla\Firefox" ^ + /v DisplayBookmarksToolbar ^ + /t REG_DWORD ^ + /d 1 ^ + /f + +echo creating extensions directory ... +mkdir %FIREFOXBASE%\distribution\extensions 1>nul 2>nul + +echo installing badger(eff) to fight internet bullshit ... +copy /Y %BADGERFILE% %FIREFOXBASE%\distribution\extensions\%BADGERTARGET% + +echo installing uBlock to fight even more internet bullshit ... +copy /Y %UBLOCKFILE% %FIREFOXBASE%\distribution\extensions\%UBLOCKTARGET% + +echo installing 1Password plugin ... +copy /Y %PASSWORD1FILE% %FIREFOXBASE%\distribution\extensions\%PASSWORD1TARGET% + +echo installing Bitwarden plugin ... +copy /Y %BITWARDENFILE% %FIREFOXBASE%\distribution\extensions\%BITWARDENTARGET% + +echo ####### %0 ####### + diff --git a/scripts/install-git.cmd b/scripts/install-git.cmd index 8cc23f5..4294e6c 100644 --- a/scripts/install-git.cmd +++ b/scripts/install-git.cmd @@ -1,16 +1,16 @@ -@echo off - -set CONFIG=install-git.txt -set EXE=..\software\Git-2.29.0-64-bit.exe - -echo ####### %0 ####### - -echo killing ssh processes... -taskkill /F /IM ssh-agent.exe -taskkill /F /IM ssh.exe - -echo installing GIT ... -%EXE% /LOADINF=%CONFIG% /NORESTART /NOCANCEL /SILENT /SUPPRESSMSGBOXES /CLOSEAPPLICATIONS - -echo ####### %0 ####### - +@echo off + +set CONFIG=install-git.txt +set EXE=..\software\Git-2.29.0-64-bit.exe + +echo ####### %0 ####### + +echo killing ssh processes... +taskkill /F /IM ssh-agent.exe +taskkill /F /IM ssh.exe + +echo installing GIT ... +%EXE% /LOADINF=%CONFIG% /NORESTART /NOCANCEL /SILENT /SUPPRESSMSGBOXES /CLOSEAPPLICATIONS + +echo ####### %0 ####### + diff --git a/scripts/install-git.txt b/scripts/install-git.txt index a8de56b..2b117ab 100644 --- a/scripts/install-git.txt +++ b/scripts/install-git.txt @@ -1,23 +1,23 @@ -[Setup] -Lang=default -Dir=c:\tools\git -Group=Git -NoIcons=1 -SetupType=default -Components=gitlfs -Tasks= -EditorOption=CustomEditor -CustomEditorPath=c:\tools\vim.exe -DefaultBranchOption= -PathOption=CmdTools -SSHOption=OpenSSH -TortoiseOption=false -CURLOption=OpenSSL -CRLFOption=CRLFCommitAsIs -BashTerminalOption=ConHost -GitPullBehaviorOption=Merge -UseCredentialManager=Disabled -PerformanceTweaksFSCache=Disabled -EnableSymlinks=Disabled -EnablePseudoConsoleSupport=Disabled - +[Setup] +Lang=default +Dir=c:\tools\git +Group=Git +NoIcons=1 +SetupType=default +Components=gitlfs +Tasks= +EditorOption=CustomEditor +CustomEditorPath=c:\tools\vim.exe +DefaultBranchOption= +PathOption=CmdTools +SSHOption=OpenSSH +TortoiseOption=false +CURLOption=OpenSSL +CRLFOption=CRLFCommitAsIs +BashTerminalOption=ConHost +GitPullBehaviorOption=Merge +UseCredentialManager=Disabled +PerformanceTweaksFSCache=Disabled +EnableSymlinks=Disabled +EnablePseudoConsoleSupport=Disabled + diff --git a/scripts/install-logonscript.cmd b/scripts/install-logonscript.cmd index 10d7f39..5a5a883 100644 --- a/scripts/install-logonscript.cmd +++ b/scripts/install-logonscript.cmd @@ -1,28 +1,28 @@ -@echo off - -set SOURCE=deploy/logon.cmd -set TOOLS=c:\tools -set TARGET="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Startup" - -echo ####### %0 ####### - -rem cleanup ... -del /Q /F %TARGET%\logon* 1>nul 2>nul -del /Q /F %TOOLS%\logon.cmd 1>nul 2>nul - -echo copy logon.cmd to %TOOLS% ... -copy /Y %SOURCE% %TOOLS% - -echo create link for logon script... -mklink %TARGET%\logon.cmd %TOOLS%\logon.cmd - -echo create link on desktop... -del /Q /F "%USERPROFILE%\Desktop\Autostart*" 1>nul 2>nul -rmdir /Q "%USERPROFILE%\Desktop\Autostart" 1>nul 2>nul -mklink /D "%USERPROFILE%\Desktop\Autostart" %TARGET% - -echo execute logon script... -call %TARGET%\logon.cmd - -echo ####### %0 ####### - +@echo off + +set SOURCE=deploy/logon.cmd +set TOOLS=c:\tools +set TARGET="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Startup" + +echo ####### %0 ####### + +rem cleanup ... +del /Q /F %TARGET%\logon* 1>nul 2>nul +del /Q /F %TOOLS%\logon.cmd 1>nul 2>nul + +echo copy logon.cmd to %TOOLS% ... +copy /Y %SOURCE% %TOOLS% + +echo create link for logon script... +mklink %TARGET%\logon.cmd %TOOLS%\logon.cmd + +echo create link on desktop... +del /Q /F "%USERPROFILE%\Desktop\Autostart*" 1>nul 2>nul +rmdir /Q "%USERPROFILE%\Desktop\Autostart" 1>nul 2>nul +mklink /D "%USERPROFILE%\Desktop\Autostart" %TARGET% + +echo execute logon script... +call %TARGET%\logon.cmd + +echo ####### %0 ####### + diff --git a/scripts/install-openshell.cmd b/scripts/install-openshell.cmd index 5cd2f14..5862618 100644 --- a/scripts/install-openshell.cmd +++ b/scripts/install-openshell.cmd @@ -1,22 +1,22 @@ -@echo off - -set SCRIPTS=..\scripts -set SOFTWARE=..\software - -set EXE=OpenShellSetup_4_4_160.exe -set MSI=OpenShellSetup64_4_4_160.msi - -echo ####### %0 ####### - -cd %SOFTWARE% -@echo on -%EXE% extract64 -msiexec /i %MSI% ADDLOCAL=StartMenu,ClassicExplorer /passive -@echo off - -rem cleanup ... -del /Q %MSI% 1>nul 2>nul -cd %SCRIPTS - -echo ####### %0 ####### - +@echo off + +set SCRIPTS=..\scripts +set SOFTWARE=..\software + +set EXE=OpenShellSetup_4_4_160.exe +set MSI=OpenShellSetup64_4_4_160.msi + +echo ####### %0 ####### + +cd %SOFTWARE% +@echo on +%EXE% extract64 +msiexec /i %MSI% ADDLOCAL=StartMenu,ClassicExplorer /passive +@echo off + +rem cleanup ... +del /Q %MSI% 1>nul 2>nul +cd %SCRIPTS% + +echo ####### %0 ####### + diff --git a/scripts/install-powertweaks.cmd b/scripts/install-powertweaks.cmd index 074066f..13b8c91 100644 --- a/scripts/install-powertweaks.cmd +++ b/scripts/install-powertweaks.cmd @@ -1,9 +1,9 @@ -@echo off - -echo ####### %0 ####### - -echo disable hibernate ... -powercfg -H off - -echo ####### %0 ####### - +@echo off + +echo ####### %0 ####### + +echo disable hibernate ... +powercfg -H off + +echo ####### %0 ####### + diff --git a/scripts/install-tweaks.cmd b/scripts/install-tweaks.cmd index f4616c8..525b0f3 100644 --- a/scripts/install-tweaks.cmd +++ b/scripts/install-tweaks.cmd @@ -1,14 +1,14 @@ -@echo off -set TARGET=tweaks - -echo ####### %0 ####### - -IF EXIST "%TARGET%\*.reg" ( - FOR /F "tokens=*" %%A IN ('DIR /B "%TARGET%\*.reg"') DO ( - echo "%TARGET%\%%A" - regedit /S "%TARGET%\%%A" - ) -) - -echo ####### %0 ####### - +@echo off +set TARGET=tweaks + +echo ####### %0 ####### + +IF EXIST "%TARGET%\*.reg" ( + FOR /F "tokens=*" %%A IN ('DIR /B "%TARGET%\*.reg"') DO ( + echo "%TARGET%\%%A" + regedit /S "%TARGET%\%%A" + ) +) + +echo ####### %0 ####### + diff --git a/scripts/uninstall-apps.ps1 b/scripts/uninstall-apps.ps1 index 5484ad5..cc2dcce 100644 --- a/scripts/uninstall-apps.ps1 +++ b/scripts/uninstall-apps.ps1 @@ -1,16 +1,16 @@ -# REMOVE all applications except the Store ... - -write-host '#######',(split-path $PSCommandPath -Leaf),'#######' - -$ErrorActionPreference = "SilentlyContinue" - -# $progressPreference = 'SilentlyContinue' -Get-AppxPackage -AllUsers | - where-object {$_.name -notlike "*store*"} | - Remove-AppxPackage -Get-AppxProvisionedPackage -online | - where-object {$_.name -notlike "*store*"} | - Remove-AppxProvisionedPackage -online - -write-host '#######',(split-path $PSCommandPath -Leaf),'#######' - +# REMOVE all applications except the Store ... + +write-host '#######',(split-path $PSCommandPath -Leaf),'#######' + +$ErrorActionPreference = "SilentlyContinue" + +# $progressPreference = 'SilentlyContinue' +Get-AppxPackage -AllUsers | + where-object {$_.name -notlike "*store*"} | + Remove-AppxPackage +Get-AppxProvisionedPackage -online | + where-object {$_.name -notlike "*store*"} | + Remove-AppxProvisionedPackage -online + +write-host '#######',(split-path $PSCommandPath -Leaf),'#######' + diff --git a/scripts/uninstall-edge.cmd b/scripts/uninstall-edge.cmd index 59d7163..c797eff 100644 --- a/scripts/uninstall-edge.cmd +++ b/scripts/uninstall-edge.cmd @@ -1,12 +1,14 @@ -@echo off - -set EDGEROOT="C:\Program Files (x86)\Microsoft\Edge" -set INSTALLER=Application\8*\Installer - -echo ####### %0 ####### - -%EDGEROOT%\%INSTALLER%\setup.exe --uninstall --system-level --verbose-logging --force-uninstall -rd /S /Q %EDGEROOT% - -echo ####### %0 ####### - +@echo off + +set EDGEROOT="C:\Program Files (x86)\Microsoft\Edge" +set EDGEUPDATE="C:\Program Files (x86)\Microsoft\EdgeUpdate" +set INSTALLER=Application\8*\Installer + +echo ####### %0 ####### + +%EDGEROOT%\%INSTALLER%\setup.exe --uninstall --system-level --verbose-logging --force-uninstall +rd /S /Q %EDGEROOT% 1>nul 2>nul +rd /S /Q %EDGEUPDATE% 1>nul 2>nul + +echo ####### %0 ####### + diff --git a/scripts/uninstall-onedrive.cmd b/scripts/uninstall-onedrive.cmd index c0c2418..594765b 100644 --- a/scripts/uninstall-onedrive.cmd +++ b/scripts/uninstall-onedrive.cmd @@ -1,33 +1,33 @@ -@echo off - -set x86=%SYSTEMROOT%\System32\OneDriveSetup.exe -set x64=%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe - -echo ####### %0 ####### - -echo KILLING OneDrive ... -taskkill /f /im OneDrive.exe > NUL 2>&1 -ping 127.0.0.1 -n 5 > NUL 2>&1 - -echo UNINSTALLING OneDrive ... -if exist %x64% ( - %x64% /uninstall -) else ( - %x86% /uninstall -) -ping 127.0.0.1 -n 5 > NUL 2>&1 - -echo CLEANUP OneDrive ... -rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1 -rd "C:\OneDriveTemp" /Q /S > NUL 2>&1 -rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1 -rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1 - -echo remove OneDrive from explorer ... -reg DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1 -reg DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1 -reg DELETE "HKEY_CURRENT_USER\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1 -reg DELETE "HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1 - -echo ####### %0 ####### - +@echo off + +set x86=%SYSTEMROOT%\System32\OneDriveSetup.exe +set x64=%SYSTEMROOT%\SysWOW64\OneDriveSetup.exe + +echo ####### %0 ####### + +echo KILLING OneDrive ... +taskkill /f /im OneDrive.exe > NUL 2>&1 +ping 127.0.0.1 -n 5 > NUL 2>&1 + +echo UNINSTALLING OneDrive ... +if exist %x64% ( + %x64% /uninstall +) else ( + %x86% /uninstall +) +ping 127.0.0.1 -n 5 > NUL 2>&1 + +echo CLEANUP OneDrive ... +rd "%USERPROFILE%\OneDrive" /Q /S > NUL 2>&1 +rd "C:\OneDriveTemp" /Q /S > NUL 2>&1 +rd "%LOCALAPPDATA%\Microsoft\OneDrive" /Q /S > NUL 2>&1 +rd "%PROGRAMDATA%\Microsoft OneDrive" /Q /S > NUL 2>&1 + +echo remove OneDrive from explorer ... +reg DELETE "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1 +reg DELETE "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /f > NUL 2>&1 +reg DELETE "HKEY_CURRENT_USER\Software\Classes\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1 +reg DELETE "HKEY_CURRENT_USER\Software\Classes\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}\ShellFolder" /f > NUL 2>&1 + +echo ####### %0 ####### +