bugfixing

This commit is contained in:
Michael H.G. Schmidt 2022-12-30 19:53:13 +01:00
parent 82be181f46
commit addbb08196
2 changed files with 30 additions and 17 deletions

View File

@ -3,7 +3,7 @@ call check-for-admin
if %ERRORLEVEL% neq 0 exit /b if %ERRORLEVEL% neq 0 exit /b
set EXE=..\software\totalcommander-setup.exe set EXE=..\software\totalcommander-setup.exe
set KEY=..\comany\wincmd.key set KEY=..\company\wincmd.key
set TARGET=c:\totalcmd set TARGET=c:\totalcmd
set STARTMENU=%PROGRAMDATA%\"Microsoft\Windows\Start Menu\Programs" set STARTMENU=%PROGRAMDATA%\"Microsoft\Windows\Start Menu\Programs"
set STARTMENU_USER=%APPDATA%\"Microsoft\Windows\Start Menu\Programs" set STARTMENU_USER=%APPDATA%\"Microsoft\Windows\Start Menu\Programs"
@ -21,9 +21,11 @@ start /wait %EXE% /AHMGDU
rem ... stupid Total Commander is installing its links to user area ? WTF ? rem ... stupid Total Commander is installing its links to user area ? WTF ?
echo renaming and moving TotalCommander desktop link to public desktop ... echo renaming and moving TotalCommander desktop link to public desktop ...
move /Y "%USERPROFILE%\Desktop\Total Commander*" "%PUBLIC%\Desktop\TCM.lnk" move /Y "%USERPROFILE%\Desktop\Total Commander*" "%PUBLIC%\Desktop\TCM.lnk"
icacls %PUBLIC%\Desktop\TCM.lnk /grant Users:F
echo moving Total Commander startmenu shortcut ... echo moving Total Commander startmenu shortcut ...
move /Y %STARTMENU_USER%\"Total Commander\Total Commander 64 bit.lnk" %STARTMENU% move /Y %STARTMENU_USER%\"Total Commander\Total Commander 64 bit.lnk" %STARTMENU%
icacls %STARTMENU%\"Total Commander\Total Commander 64 bit.lnk" /grant Users:F
echo removing Total Commander startmenu folder ... echo removing Total Commander startmenu folder ...
rd /S /Q %STARTMENU_USER%\"Total Commander" 2>nul rd /S /Q %STARTMENU_USER%\"Total Commander" 2>nul

View File

@ -6,6 +6,7 @@ rem ===================
set TOOLS=c:\tools set TOOLS=c:\tools
set PERSONALFILES_DONE=%LOCALAPPDATA%\.personalfiles_done set PERSONALFILES_DONE=%LOCALAPPDATA%\.personalfiles_done
set SETTINGS=%TOOLS%\scripts\settings.cmd set SETTINGS=%TOOLS%\scripts\settings.cmd
set GITWORKDIR=%USERPROFILE%\workspace\git
rem already done ? rem already done ?
if EXIST %PERSONALFILES_DONE% ( if EXIST %PERSONALFILES_DONE% (
@ -32,45 +33,55 @@ if NOT EXIST %SETTINGS% (
echo ++++++++++++++++++ echo ++++++++++++++++++
echo USERNAME=%USERNAME% echo USERNAME=%USERNAME%
echo USERPROFILE=%USERPROFILE% echo USERPROFILE=%USERPROFILE%
echo GITWORKDIR=%GITWORKDIR%
echo gitserver=%windows_updates% echo gitserver=%windows_updates%
echo gitrepo=%gitrepo% echo gitrepo=%gitrepo%
echo ++++++++++++++++++ echo ++++++++++++++++++
echo. echo.
rem GIT folder anmd REPO ... rem GIT folder and REPO ...
echo Creating folder %USERPROFILE%\workspace\git ... echo Creating folder %GITWORKDIR% ...
mkdir %USERPROFILE%\workspace\git 1>nul 2>nul mkdir %GITWORKDIR% 1>nul 2>nul
if NOT exist %USERPROFILE%\workspace\git ( if NOT exist %GITWORKDIR% (
echo ERROR: cannot create folder [ %USERPROFILE%\workspace\git ] ! echo ERROR: cannot create folder [ %GITWORKDIR% ] !
echo ####### %0 ####### echo ####### %0 #######
exit /b exit /b
) )
echo cloning GIT repository ... echo cloning GIT repository ...
cd %USERPROFILE%\workspace\git cd %GITWORKDIR%
git clone https://%USERNAME%@%gitserver%/%USERNAME%/%gitrepo%.git git clone https://%USERNAME%@%gitserver%/%USERNAME%/%gitrepo%.git
echo copying ini file for TOTALCOMMANDER ... if %ERRORLEVEL% NEQ 0 (
if EXIST %TOOLS%\personal\WINCMD.ini ( echo ERROR while executing "git clone".
copy /Y %TOOLS%\personal\WINCMD.ini %APPDATA%\GHISLER echo cannot continue!
echo ####### %0 #######
exit /b
) )
echo copying TOTALCOMMANDER ftp config file ... rem Totalcommander ini file ...
if EXIST %TOOLS%\personal\wcx_ftp.ini ( if EXIST %GITWORKDIR%\personal\WINCMD.ini (
copy /Y %TOOLS%\personal\wcx_ftp.ini %APPDATA%\GHISLER echo copying ini file for TOTALCOMMANDER ...
copy /Y %GITWORKDIR%\personal\WINCMD.ini %APPDATA%\GHISLER
)
rem Totalcommander ftp config ...
if EXIST %GITWORKDIR%\personal\wcx_ftp.ini (
echo copying TOTALCOMMANDER ftp config file ...
copy /Y %GITWORKDIR%\personal\wcx_ftp.ini %APPDATA%\GHISLER
) )
rem SSH keys ... rem SSH keys ...
if EXIST %TOOLS%\personal ( if EXIST %GITWORKDIR%\personal (
echo copying personal SSH keys ... echo copying personal SSH keys ...
copy /Y %TOOLS%\personal\id*.* %USERPROFILE%\.ssh 2>nul copy /Y %GITWORKDIR%\personal\id*.* %USERPROFILE%\.ssh 2>nul
) )
rem GIT rem GIT
if EXIST %TOOLS%\personal\gitconfig ( if EXIST %GITWORKDIR%\personal\gitconfig (
echo copying gitconfig ... echo copying gitconfig ...
copy /Y %TOOLS%\personal\gitconfig %USERPROFILE%\.gitconfig copy /Y %GITWORKDIR%\personal\gitconfig %USERPROFILE%\.gitconfig
) )
rem create a statusfile (this codeblock must be executed only once per user) ... rem create a statusfile (this codeblock must be executed only once per user) ...