w10install/optional/install-totalcommander.cmd

43 lines
1.2 KiB
Batchfile
Raw Permalink Normal View History

2024-09-08 19:53:09 +02:00
@echo off
call check-for-admin
if %ERRORLEVEL% neq 0 exit /b
set EXE=..\software\totalcommander-setup.exe
2024-12-21 23:26:48 +01:00
set KEY=..\custom\wincmd.key
2024-09-08 19:53:09 +02: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
echo renaming and moving TotalCommander desktop link to public desktop ...
move /Y "%USERPROFILE%\Desktop\Total Commander*" "%PUBLIC%\Desktop\Total Commander.lnk"
icacls "%PUBLIC%\Desktop\Total Commander.lnk" /grant Users:R
echo moving Total Commander startmenu shortcut ...
move /Y "%STARTMENU_USER%\Total Commander\Total Commander 64 bit.lnk" "%STARTMENU%\Tools\Total Commander.lnk"
icacls "%STARTMENU%\Tools\Total Commander.lnk" /grant Users:R
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