2021-01-10 23:14:52 +01:00
|
|
|
@echo off
|
|
|
|
set TOOLS=c:\tools
|
2021-03-02 13:57:45 +01:00
|
|
|
set STATUSFILE=%LOCALAPPDATA%\.user_settings_done
|
2021-03-14 11:53:43 +01:00
|
|
|
set STARTMENU=%APPDATA%\"Microsoft\Windows\Start Menu\Programs"
|
2021-03-14 12:35:41 +01:00
|
|
|
set STARTMENU_PUBLIC=%PROGRAMDATA%\"Microsoft\Windows\Start Menu\Programs"
|
2021-01-10 23:14:52 +01:00
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
|
2021-01-12 17:01:34 +01:00
|
|
|
echo removing wallpaper ...
|
2021-01-12 22:54:02 +01:00
|
|
|
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v WallPaper /t REG_SZ /d " " /f 1>nul
|
|
|
|
RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters
|
2021-01-10 23:14:52 +01:00
|
|
|
|
2021-03-15 11:19:21 +01:00
|
|
|
echo set desktop colour (RGB) ...
|
|
|
|
%TOOLS%\setbgcol 3 131 135
|
2021-01-10 23:14:52 +01:00
|
|
|
|
|
|
|
echo starting BGInfo ...
|
|
|
|
%TOOLS%\bginfo\bginfo64.exe %TOOLS%\bginfo\config.bgi /NOLICPROMPT /silent /timer:0
|
|
|
|
|
2021-03-08 20:45:07 +01:00
|
|
|
echo.
|
|
|
|
echo #####
|
|
|
|
echo ##### USER CONFIG FILES
|
|
|
|
echo #####
|
|
|
|
echo.
|
2021-02-13 20:05:56 +01:00
|
|
|
|
2021-01-27 22:05:17 +01:00
|
|
|
rem SSH
|
2021-01-12 17:01:34 +01:00
|
|
|
mkdir %USERPROFILE%\workspace 1>nul 2>nul
|
|
|
|
mkdir %USERPROFILE%\.ssh 1>nul 2>nul
|
2021-01-29 12:30:37 +01:00
|
|
|
if NOT EXIST %USERPROFILE%\.ssh\config (
|
2021-03-02 13:57:45 +01:00
|
|
|
echo setup for SSH ...
|
2021-01-29 12:30:37 +01:00
|
|
|
copy /Y %TOOLS%\scripts\config\ssh-config.txt %USERPROFILE%\.ssh\config
|
|
|
|
)
|
2021-01-27 22:05:17 +01:00
|
|
|
|
2021-01-30 21:38:46 +01:00
|
|
|
rem VIM
|
|
|
|
if NOT EXIST %USERPROFILE%\.vimrc (
|
2021-03-02 13:57:45 +01:00
|
|
|
echo setup for VIM ...
|
2021-01-30 21:38:46 +01:00
|
|
|
copy /Y %TOOLS%\scripts\config\vimrc.txt ^
|
|
|
|
%USERPROFILE%\.vimrc
|
|
|
|
)
|
|
|
|
|
2021-01-27 22:05:17 +01:00
|
|
|
rem TOTALCOMMANDER
|
2021-01-31 23:59:16 +01:00
|
|
|
if NOT EXIST %APPDATA%\GHISLER\WINCMD.ini (
|
2021-03-14 23:14:01 +01:00
|
|
|
echo copying ini file for TOTALCOMMANDER ...
|
2021-01-31 23:59:16 +01:00
|
|
|
mkdir %APPDATA%\GHISLER 1>nul 2>nul
|
2021-03-14 23:14:01 +01:00
|
|
|
|
|
|
|
rem ini file ...
|
|
|
|
if EXIST %TOOLS%\personal\WINCMD.ini (
|
|
|
|
copy /Y %TOOLS%\personal\WINCMD.ini %APPDATA%\GHISLER
|
|
|
|
) else (
|
|
|
|
copy /Y %TOOLS%\optional\config\WINCMD.ini %APPDATA%\GHISLER
|
|
|
|
)
|
|
|
|
|
|
|
|
rem ftp config file ...
|
|
|
|
if EXIST %TOOLS%\personal\wcx_ftp.ini (
|
|
|
|
copy /Y %TOOLS%\personal\wcx_ftp.ini %APPDATA%\GHISLER
|
|
|
|
) else (
|
|
|
|
copy /Y %TOOLS%\optional\config\wcx_ftp.ini %APPDATA%\GHISLER
|
|
|
|
)
|
2021-01-29 12:30:37 +01:00
|
|
|
)
|
2021-01-27 22:05:17 +01:00
|
|
|
|
2021-02-03 13:37:54 +01:00
|
|
|
rem WINDOWS TERMINAL
|
|
|
|
set LOCALSTATE=%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
|
|
|
|
if NOT EXIST %LOCALSTATE%\settings.json (
|
2021-03-02 13:57:45 +01:00
|
|
|
echo setup for WINDOWS TERMINAL
|
2021-02-03 13:37:54 +01:00
|
|
|
mkdir %LOCALSTATE% 1>nul 2>nul
|
|
|
|
copy /Y %TOOLS%\scripts\config\wt-settings.json ^
|
|
|
|
%LOCALSTATE%\settings.json
|
|
|
|
)
|
|
|
|
|
2021-03-02 23:29:07 +01:00
|
|
|
if EXIST %STATUSFILE% GOTO END
|
2021-03-13 23:32:05 +01:00
|
|
|
|
|
|
|
echo deploying SSH keys ...
|
2021-03-14 00:34:27 +01:00
|
|
|
copy /Y %TOOLS%\personal\id*.* %USERPROFILE%\.ssh 2>nul
|
2021-03-13 23:32:05 +01:00
|
|
|
|
2021-03-02 13:57:45 +01:00
|
|
|
echo.
|
|
|
|
echo #####
|
|
|
|
echo ##### USER TWEAKS
|
|
|
|
echo #####
|
|
|
|
echo.
|
2021-02-14 20:35:35 +01:00
|
|
|
|
|
|
|
echo add "This PC" icon for current user on desktop Windows 10 ...
|
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" ^
|
|
|
|
/v "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t REG_DWORD /d 0 /f 1>nul
|
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" ^
|
|
|
|
/v "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t REG_DWORD /d 0 /f 1>nul
|
|
|
|
|
|
|
|
echo add userhome icon on windows 10 desktop for current user ...
|
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" ^
|
|
|
|
/v "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" /t REG_DWORD /d 0 /f 1>nul
|
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu" ^
|
|
|
|
/v "{59031a47-3f72-44a7-89c5-5595fe6b30ee}" /t REG_DWORD /d 0 /f 1>nul
|
|
|
|
|
|
|
|
echo refresh desktop (W10 style)
|
|
|
|
ie4uinit.exe -show
|
2021-02-13 20:05:56 +01:00
|
|
|
|
2021-02-14 20:58:44 +01:00
|
|
|
echo enabling fast shutdown ...
|
2021-02-14 21:54:31 +01:00
|
|
|
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" ^
|
2021-02-14 20:58:44 +01:00
|
|
|
/v "WaitToKillAppTimeOut" /t REG_DWORD /d 2000 /f 1>nul
|
2021-02-14 21:54:31 +01:00
|
|
|
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" ^
|
2021-02-14 20:58:44 +01:00
|
|
|
/v "HungAppTimeout" /t REG_DWORD /d 2000 /f 1>nul
|
2021-02-14 21:54:31 +01:00
|
|
|
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" ^
|
2021-02-14 20:58:44 +01:00
|
|
|
/v "AutoEndTasks" /t REG_DWORD /d 1 /f 1>nul
|
|
|
|
|
|
|
|
echo add seconds to clock ...
|
2021-02-14 21:54:31 +01:00
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ^
|
2021-02-14 20:58:44 +01:00
|
|
|
/v "ShowSecondsInSystemClock" /t REG_DWORD /d 1 /f 1>nul
|
|
|
|
|
2021-02-13 20:05:56 +01:00
|
|
|
echo disable search box on taskbar ...
|
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Search" ^
|
2021-02-13 22:04:02 +01:00
|
|
|
/v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f 1>nul
|
2021-02-13 20:05:56 +01:00
|
|
|
|
2021-02-13 22:04:02 +01:00
|
|
|
echo disable multi tasking view button on the taskbar ...
|
2021-02-13 20:05:56 +01:00
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ^
|
2021-02-13 22:04:02 +01:00
|
|
|
/v "ShowTaskViewButton" /t REG_DWORD /d 0 /f 1>nul
|
|
|
|
|
|
|
|
echo disable cortana button on the taskbar ...
|
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" ^
|
|
|
|
/v "ShowCortanaButton" /t REG_DWORD /d 0 /f 1>nul
|
|
|
|
|
|
|
|
echo disable autotray for the taskbar ...
|
|
|
|
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer" ^
|
|
|
|
/v "EnableAutoTray" /t REG_DWORD /d 0 /f 1>nul
|
|
|
|
|
|
|
|
echo disable notification center ...
|
|
|
|
reg add "HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer" ^
|
|
|
|
/v "DisableNotificationCenter" /t REG_DWORD /d 1 /f 1>nul
|
|
|
|
|
2021-02-14 20:35:35 +01:00
|
|
|
echo removing pinned apps from taskbar ...
|
2021-02-13 22:29:02 +01:00
|
|
|
del /F /S /Q /A "%AppData%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\*"
|
|
|
|
reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Taskband" /f
|
2021-02-13 20:05:56 +01:00
|
|
|
|
2021-03-02 14:01:12 +01:00
|
|
|
echo loading OpenShell config ...
|
|
|
|
rem config must be full qualified pathname (OpenShell BUG!)
|
|
|
|
set CONFIG=%TOOLS%\scripts\config\OpenshellSettings.xml
|
|
|
|
"%ProgramFiles%\Open-Shell\StartMenu.exe" -xml %CONFIG%
|
|
|
|
|
2021-02-13 20:05:56 +01:00
|
|
|
echo restarting explorer ...
|
2021-03-08 20:45:07 +01:00
|
|
|
taskkill /f /im explorer.exe 2>nul
|
|
|
|
timeout /T 2
|
2021-02-13 20:05:56 +01:00
|
|
|
start explorer.exe
|
|
|
|
|
2021-03-02 13:57:45 +01:00
|
|
|
echo 1 >%STATUSFILE%
|
2021-02-14 20:35:35 +01:00
|
|
|
|
2021-03-02 13:57:45 +01:00
|
|
|
:END
|
|
|
|
|
|
|
|
echo.
|
|
|
|
echo #####
|
2021-03-06 15:10:45 +01:00
|
|
|
echo ##### cleaning ...
|
2021-03-02 13:57:45 +01:00
|
|
|
echo #####
|
|
|
|
echo.
|
2021-02-14 20:35:35 +01:00
|
|
|
|
2021-03-14 12:35:41 +01:00
|
|
|
rem MORE stupid OS problems ...
|
|
|
|
rem these actions must to be done over and over again - some zombies keep coming back ...
|
|
|
|
echo reorg for start menu and desktop ...
|
|
|
|
echo ####################################
|
|
|
|
echo.
|
|
|
|
|
|
|
|
rem ... stupid OS problem #4
|
|
|
|
rem why the heck are "System Tools" installed per user ? stupid Microsoft.
|
|
|
|
echo System Tools ...
|
|
|
|
move /Y %STARTMENU%\"System Tools\*.*" ^
|
|
|
|
%STARTMENU_PUBLIC%\"System Tools" 2>nul
|
|
|
|
|
2021-03-14 14:11:38 +01:00
|
|
|
rem remove and rename some stuff ...
|
|
|
|
move /Y %STARTMENU_PUBLIC%\"System Tools\computer.lnk" ^
|
|
|
|
%STARTMENU_PUBLIC%\"System Tools\This PC.lnk" 2>nul
|
|
|
|
del /F %STARTMENU_PUBLIC%\"System Tools\Command Prompt.lnk" 2>nul
|
|
|
|
|
2021-03-14 12:35:41 +01:00
|
|
|
rem ... stupid OS problem #5
|
|
|
|
rem same here for the accessibility tools. WHY ? stupid Microsoft.
|
|
|
|
echo Accessibility Tools ...
|
|
|
|
move /Y %STARTMENU%\"Accessibility\*.*" ^
|
|
|
|
%STARTMENU_PUBLIC%\"Accessibility" 2>nul
|
2021-03-14 11:53:43 +01:00
|
|
|
|
|
|
|
rem Edge is such a zombie!
|
2021-03-14 12:35:41 +01:00
|
|
|
echo Microsoft Edge ...
|
2021-03-14 11:53:43 +01:00
|
|
|
del /F %STARTMENU%\"Microsoft Edge.lnk" 2>nul
|
|
|
|
del /F %USERPROFILE%\"Desktop\Microsoft Edge.lnk" 2>nul
|
|
|
|
|
|
|
|
rem IE too!
|
2021-03-14 12:35:41 +01:00
|
|
|
echo IE, sigh ...
|
2021-03-14 11:53:43 +01:00
|
|
|
del /F %STARTMENU%\"Accessories\Internet Explorer.lnk" 2>nul
|
|
|
|
|
|
|
|
rem finally remove some useless directories in the users start menu ...
|
2021-03-14 12:35:41 +01:00
|
|
|
echo Startmenu crap ...
|
2021-03-14 11:53:43 +01:00
|
|
|
rd /S /Q %STARTMENU%\"Accessories" 2>nul
|
|
|
|
rd /S /Q %STARTMENU%\"Accessibility" 2>nul
|
|
|
|
rd /S /Q %STARTMENU%\"Administrative Tools" 2>nul
|
|
|
|
rd /S /Q %STARTMENU%\"Maintenance" 2>nul
|
|
|
|
rd /S /Q %STARTMENU%\"System Tools" 2>nul
|
|
|
|
rd /S /Q %STARTMENU%\"Windows Powershell" 2>nul
|
|
|
|
|
2021-03-14 12:35:41 +01:00
|
|
|
echo cleaning users home directory ...
|
|
|
|
echo #################################
|
|
|
|
echo.
|
|
|
|
|
2021-03-06 15:10:45 +01:00
|
|
|
echo 3D Objects ...
|
|
|
|
rd /S /Q %USERPROFILE%\"3D Objects" 2>nul
|
|
|
|
|
|
|
|
echo Contacts ...
|
|
|
|
rd /S /Q %USERPROFILE%\Contacts 2>nul
|
|
|
|
|
|
|
|
echo Favorites ...
|
|
|
|
rd /S /Q %USERPROFILE%\Favorites 2>nul
|
|
|
|
|
|
|
|
echo Saved Games (folder used by Microsoft only) ...
|
|
|
|
rd /S /Q %USERPROFILE%\"Saved Games" 2>nul
|
|
|
|
|
|
|
|
echo Links ...
|
|
|
|
rd /S /Q %USERPROFILE%\Links 2>nul
|
|
|
|
|
|
|
|
echo Searches ...
|
|
|
|
rd /S /Q %USERPROFILE%\Searches 2>nul
|
|
|
|
|
|
|
|
echo.
|
2021-02-14 20:35:35 +01:00
|
|
|
echo starting workstation service ...
|
2021-01-10 23:14:52 +01:00
|
|
|
net start workstation 1>nul 2>nul
|
|
|
|
net config workstation
|
|
|
|
|
|
|
|
echo ####### %0 #######
|
2021-03-02 13:57:45 +01:00
|
|
|
timeout /T 2
|
2021-01-10 23:14:52 +01:00
|
|
|
|