This commit is contained in:
Michael H.G. Schmidt 2021-01-12 19:11:44 +01:00
parent a9af282683
commit 4aa6dffcf9
4 changed files with 59 additions and 44 deletions

View File

@ -5,7 +5,7 @@ set T=c:\TEMP
set TOOLS=c:\tools set TOOLS=c:\tools
set SCRIPTS=%TOOLS%\scripts set SCRIPTS=%TOOLS%\scripts
echo.
echo ####### %0 ####### echo ####### %0 #######
echo creating %T% ... echo creating %T% ...
@ -15,15 +15,18 @@ echo cd to %SCRIPTS% ...
cd /D %SCRIPTS% cd /D %SCRIPTS%
echo moving files in deploy folder to %TOOLS% ... echo moving files in deploy folder to %TOOLS% ...
move /Y deploy\* %TOOLS% 1>nul 2>nul move /Y deploy\* %TOOLS%
rmdir deploy 1>nul 2>nul rmdir deploy 1>nul 2>nul
rem ####################### echo.
rem ### GLOBAL settings ### echo #######################
rem ####################### echo ### GLOBAL settings ###
echo #######################
echo.
rem echo DISABLE firewall ... rem echo DISABLE firewall ...
rem netsh advfirewall set allprofiles state off rem netsh advfirewall set allprofiles state off
rem echo.
rem allow execution of any powershell script ... rem allow execution of any powershell script ...
powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine" powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope LocalMachine"
@ -38,79 +41,92 @@ echo.
echo setting PATH variable ( for all users) ... echo setting PATH variable ( for all users) ...
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ^ reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ^
/v PATH ^
/t REG_EXPAND_SZ ^
/d "%SYSTEMROOT%;%SYSTEMROOT%\system32;%SYSTEMROOT%\system32\wbem;%SYSTEMROOT%\system32\WindowsPowerShell\v1.0;%TOOLS%;%TOOLS%\git\bin;%TOOLS%\git\usr\bin;%TOOLS%\notepad++" ^ /d "%SYSTEMROOT%;%SYSTEMROOT%\system32;%SYSTEMROOT%\system32\wbem;%SYSTEMROOT%\system32\WindowsPowerShell\v1.0;%TOOLS%;%TOOLS%\git\bin;%TOOLS%\git\usr\bin;%TOOLS%\notepad++" ^
/f /v PATH /t REG_EXPAND_SZ /f
echo.
rem changing power configuration ... rem changing power configuration ...
call modify-powersettings.cmd call modify-powersettings.cmd
echo.
rem installing tweaks ... rem installing tweaks ...
call install-tweaks.cmd call install-tweaks.cmd
echo.
rem ####################### echo #######################
rem ### UNINSTALL tasks ### echo ### UNINSTALL tasks ###
rem ####################### echo #######################
echo.
echo uninstall ALL Apps (but keep the store) ... rem uninstall ALL Apps (but keep the store) ...
powershell -Command .\uninstall-apps.ps1 powershell -Command .\uninstall-apps.ps1
echo.
rem uninstall OneDrive completely ... rem uninstall OneDrive completely ...
call uninstall-onedrive.cmd call uninstall-onedrive.cmd
echo.
rem uninstall Edge completely ... rem uninstall Edge completely ...
call uninstall-edge.cmd call uninstall-edge.cmd
echo.
rem ##################### echo #####################
rem ### INSTALL tasks ### echo ### INSTALL tasks ###
rem ##################### echo #####################
echo.
rem install logon script ...
call install-logonscript.cmd call install-logonscript.cmd
echo.
rem install desktop icons ...
call install-desktopicons.cmd call install-desktopicons.cmd
echo.
rem install GIT ...
call install-git.cmd call install-git.cmd
echo.
rem install openshell (fuck you microsoft) ... rem fuck you microsoft ...
call install-openshell.cmd call install-openshell.cmd
echo.
rem install Mozilla Firefox (fuck you google) ... rem fuck you google ...
call install-firefox.cmd call install-firefox.cmd
echo.
rem install F-Secure Antivirus ...
call install-antivir.cmd call install-antivir.cmd
echo.
rem ##################### echo #####################
rem ### DISABLE tasks ### echo ### DISABLE tasks ###
rem ##################### echo #####################
echo.
echo disabling logon screen background ... echo disabling logon screen background ...
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System" ^ reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\System" ^
/v DisableLogonBackgroundImage ^ /v DisableLogonBackgroundImage ^
/t REG_DWORD /d 1 /f /t REG_DWORD /d 1 /f
echo.
rem disable autologon for support user ... rem disable autologon for support user ...
call disable-autologon.cmd call disable-autologon.cmd
echo.
rem ##################### echo #####################
rem ### CLEANUP tasks ### echo ### CLEANUP tasks ###
rem ##################### echo #####################
echo.
rem this must be done as late as possible ... stupid os problem rem this must be done as late as possible ... stupid os problem
echo cleanup all the tiles ...
powershell -Command .\cleanup-tiles.ps1 powershell -Command .\cleanup-tiles.ps1
echo.
rem this one cleans the startmenu and removes dead entries ... stupid os problem #2 rem ... stupid os problem #2
call cleanup-startmenu.cmd call cleanup-startmenu.cmd
echo.
rem echo ENABLE firewall ... rem echo ENABLE firewall ...
rem netsh advfirewall set allprofiles state on rem netsh advfirewall set allprofiles state on
rem echo.
echo ####### %0 ####### echo ####### %0 #######
echo READY. echo READY.
pause pause

View File

@ -2,21 +2,19 @@
echo ####### %0 ####### echo ####### %0 #######
rem kill system processes and wait a short time ... echo kill system processes and wait a short time ...
taskkill /f /im StartMenuExperienceHost.exe taskkill /f /im StartMenuExperienceHost.exe
taskkill /f /im shellexperiencehost.exe taskkill /f /im shellexperiencehost.exe
taskkill /f /im explorer.exe taskkill /f /im explorer.exe
ping 127.0.0.1 -n 3 >nul 2>nul ping 127.0.0.1 -n 3 >nul 2>nul
rem kill dead entries in start menu and kill old live tiles ... echo cleanup TempState directories and reset cache ...
@echo on
del %LOCALAPPDATA%\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\TempState\* /q del %LOCALAPPDATA%\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\TempState\* /q
del %LOCALAPPDATA%\Packages\Microsoft.Windows.ShellExperienceHost_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 off
rem start explorer again ... echo start explorer again ...
ping 127.0.0.1 -n 1 >nul 2>nul ping 127.0.0.1 -n 1 >nul 2>nul
start explorer start explorer

View File

@ -4,8 +4,11 @@ set EXE=..\software\F-SecureNetworkInstaller-AV_AVTR20F930_.exe
echo ####### %0 ####### echo ####### %0 #######
echo installing F-Secure Antivirus ... echo installing F-Secure Anti-Virus ...
%EXE% --silent %EXE% --silent
echo removing F-Secure desktop link ...
del /F "%PUBLIC%\Desktop\F-Secure Anti-Virus.lnk" 1>nul 2>nul
echo ####### %0 ####### echo ####### %0 #######

View File

@ -4,19 +4,17 @@ set TARGET="%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs\Startup"
echo ####### %0 ####### echo ####### %0 #######
rem cleanup ... echo cleanup ...
del /Q /F %TARGET%\logon* 1>nul 2>nul del /Q /F %TARGET%\logon* 1>nul 2>nul
del /Q /F %TOOLS%\logon.cmd 1>nul 2>nul rd /S /Q %PUBLIC%\Desktop\Startup 1>nul 2>nul
echo creating link for logon script... echo creating link for logon script ...
mklink %TARGET%\logon.cmd %TOOLS%\logon.cmd mklink %TARGET%\logon.cmd %TOOLS%\logon.cmd
echo create link on desktop... echo create link for Startup folder on desktop ...
del /Q /F "%USERPROFILE%\Desktop\Autostart*" 1>nul 2>nul mklink /D "%PUBLIC%\Desktop\Startup" %TARGET%
rmdir /Q "%USERPROFILE%\Desktop\Autostart" 1>nul 2>nul
mklink /D "%USERPROFILE%\Desktop\Autostart" %TARGET%
echo execute logon script... echo execute logon script ...
call %TARGET%\logon.cmd call %TARGET%\logon.cmd
echo ####### %0 ####### echo ####### %0 #######