From 07e31b93ecc7aed8b2ab868d9f090f207c4f5deb Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Tue, 2 Mar 2021 13:57:45 +0100 Subject: [PATCH] bugfix in logon script --- tools/logon.cmd | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/tools/logon.cmd b/tools/logon.cmd index 440b93c..74dd4ab 100644 --- a/tools/logon.cmd +++ b/tools/logon.cmd @@ -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