w10install/optional/install-totalcommander.cmd

43 lines
1.1 KiB
Batchfile
Raw Normal View History

2022-11-13 22:12:39 +01:00
@echo off
call check-for-admin
if %ERRORLEVEL% neq 0 exit /b
2022-11-13 22:12:39 +01:00
set EXE=..\software\totalcommander-setup.exe
2024-02-21 13:25:46 +01:00
set KEY=..\software\wincmd.key
2023-01-15 17:52:06 +01:00
set TARGET=c:\totalcmd
2023-01-21 16:16:11 +01:00
set STARTMENU=%PROGRAMDATA%\Microsoft\Windows\Start Menu\Programs
set STARTMENU_USER=%APPDATA%\Microsoft\Windows\Start Menu\Programs
2022-11-13 22:12:39 +01:00
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 ...
2023-01-21 16:16:11 +01:00
move /Y "%USERPROFILE%\Desktop\Total Commander*" "%PUBLIC%\Desktop\Total Commander.lnk"
2023-01-22 11:39:54 +01:00
icacls "%PUBLIC%\Desktop\Total Commander.lnk" /grant Users:R
2022-11-13 22:12:39 +01:00
echo moving Total Commander startmenu shortcut ...
2023-01-21 16:16:11 +01:00
move /Y "%STARTMENU_USER%\Total Commander\Total Commander 64 bit.lnk" "%STARTMENU%\Tools\Total Commander.lnk"
2023-01-22 11:39:54 +01:00
icacls "%STARTMENU%\Tools\Total Commander.lnk" /grant Users:R
2022-11-13 22:12:39 +01:00
echo removing Total Commander startmenu folder ...
2023-01-21 16:16:11 +01:00
rd /S /Q "%STARTMENU_USER%\Total Commander" 2>nul
2022-11-13 22:12:39 +01:00
if EXIST %KEY% (
echo installing license ...
copy /Y %KEY% %TARGET%
)
rem refresh desktop (W10 style)
ie4uinit.exe -show
echo ####### %0 #######
pause