bugfix in logon script

This commit is contained in:
Michael H.G. Schmidt 2021-03-02 13:57:45 +01:00
parent 5e7686953f
commit 07e31b93ec

View File

@ -1,5 +1,6 @@
@echo off
set TOOLS=c:\tools
set STATUSFILE=%LOCALAPPDATA%\.user_settings_done
echo ####### %0 #######
@ -17,23 +18,24 @@ rem #####
rem ##### USER CONFIG FILES
rem #####
echo creating some directories and copy files for current user ...
rem SSH
mkdir %USERPROFILE%\workspace 1>nul 2>nul
mkdir %USERPROFILE%\.ssh 1>nul 2>nul
if NOT EXIST %USERPROFILE%\.ssh\config (
echo setup for SSH ...
copy /Y %TOOLS%\scripts\config\ssh-config.txt %USERPROFILE%\.ssh\config
)
rem VIM
if NOT EXIST %USERPROFILE%\.vimrc (
echo setup for VIM ...
copy /Y %TOOLS%\scripts\config\vimrc.txt ^
%USERPROFILE%\.vimrc
)
rem TOTALCOMMANDER
if NOT EXIST %APPDATA%\GHISLER\WINCMD.ini (
echo setup for TOTALCOMMANDER ...
mkdir %APPDATA%\GHISLER 1>nul 2>nul
copy /Y %TOOLS%\scripts\config\WINCMD.ini %APPDATA%\GHISLER
copy /Y %TOOLS%\scripts\config\wcx_ftp.ini %APPDATA%\GHISLER
@ -42,16 +44,18 @@ if NOT EXIST %APPDATA%\GHISLER\WINCMD.ini (
rem WINDOWS TERMINAL
set LOCALSTATE=%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
if NOT EXIST %LOCALSTATE%\settings.json (
echo setup for WINDOWS TERMINAL
mkdir %LOCALSTATE% 1>nul 2>nul
copy /Y %TOOLS%\scripts\config\wt-settings.json ^
%LOCALSTATE%\settings.json
)
rem #####
rem ##### USER TWEAKS
rem #####
if EXIST %LOCALAPPDATA%\.user_settings_done GOTO END
if EXIST %STATUSFILE% GOTO END
echo.
echo #####
echo ##### USER TWEAKS
echo #####
echo.
echo add "This PC" icon for current user on desktop Windows 10 ...
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" ^
@ -113,16 +117,20 @@ del /F "$APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Exp
del /F "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Microsoft Edge.lnk" 1>nul 2>nul
del /F "%USERPROFILE%\Desktop\Microsoft Edge.lnk" 1>nul 2>nul
echo 1 >%LOCALAPPDATA%\user_settings_done
echo 1 >%STATUSFILE%
rem #####
rem #####
rem #####
:END
echo.
echo #####
echo #####
echo #####
echo.
echo starting workstation service ...
net start workstation 1>nul 2>nul
net config workstation
:END
echo ####### %0 #######
timeout /T 2