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
set EXE=..\software\totalcommander-setup.exe
set KEY=..\comany\wincmd.key
set KEY=..\company\wincmd.key
set TARGET=c:\totalcmd
set STARTMENU=%PROGRAMDATA%\"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 ?
echo renaming and moving TotalCommander desktop link to public desktop ...
move /Y "%USERPROFILE%\Desktop\Total Commander*" "%PUBLIC%\Desktop\TCM.lnk"
icacls %PUBLIC%\Desktop\TCM.lnk /grant Users:F
echo moving Total Commander startmenu shortcut ...
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 ...
rd /S /Q %STARTMENU_USER%\"Total Commander" 2>nul

View File

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