2022-11-13 22:12:39 +01:00
|
|
|
@echo off
|
|
|
|
call check-for-admin
|
2022-11-25 15:29:57 +01:00
|
|
|
if %ERRORLEVEL% neq 0 exit /b
|
2022-11-13 22:12:39 +01:00
|
|
|
|
|
|
|
set EXE=..\software\totalcommander-setup.exe
|
2022-12-30 19:53:13 +01:00
|
|
|
set KEY=..\company\wincmd.key
|
2022-11-13 22:12:39 +01:00
|
|
|
set TARGET=c:\totalcmd
|
|
|
|
set STARTMENU=%PROGRAMDATA%\"Microsoft\Windows\Start Menu\Programs"
|
|
|
|
set STARTMENU_USER=%APPDATA%\"Microsoft\Windows\Start Menu\Programs"
|
|
|
|
|
|
|
|
if NOT EXIST %EXE% (
|
|
|
|
echo ERROR: %EXE% not found!
|
|
|
|
exit /b
|
|
|
|
)
|
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
|
|
|
|
echo installing TotalCommander ...
|
|
|
|
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"
|
2022-12-30 19:53:13 +01:00
|
|
|
icacls %PUBLIC%\Desktop\TCM.lnk /grant Users:F
|
2022-11-13 22:12:39 +01:00
|
|
|
|
|
|
|
echo moving Total Commander startmenu shortcut ...
|
|
|
|
move /Y %STARTMENU_USER%\"Total Commander\Total Commander 64 bit.lnk" %STARTMENU%
|
2022-12-30 19:53:13 +01:00
|
|
|
icacls %STARTMENU%\"Total Commander\Total Commander 64 bit.lnk" /grant Users:F
|
2022-11-13 22:12:39 +01:00
|
|
|
|
|
|
|
echo removing Total Commander startmenu folder ...
|
|
|
|
rd /S /Q %STARTMENU_USER%\"Total Commander" 2>nul
|
|
|
|
|
|
|
|
if EXIST %KEY% (
|
|
|
|
echo installing license ...
|
|
|
|
copy /Y %KEY% %TARGET%
|
|
|
|
)
|
|
|
|
|
|
|
|
rem refresh desktop (W10 style)
|
|
|
|
ie4uinit.exe -show
|
|
|
|
|
|
|
|
echo ####### %0 #######
|
|
|
|
pause
|
|
|
|
|