"Automatic" install of portable TC

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
NotNull
Senior Member
Senior Member
Posts: 298
Joined: 2019-11-25, 20:43 UTC
Location: NL

"Automatic" install of portable TC

Post by *NotNull »

Cleaning out an old laptop, I found a script to automatically install a portable version of TC from a downloaded installer.
Maybe it can help someone ... (although there must be dozens of similar scripts here on the forum)


Usage:
  • Put tc_installer.cmd in a folder.
  • Change the settings part of the script to your liking and save it:

    Code: Select all

    :: TC will be installed in INSTALLPATH\versionnumber
    	set INSTALLPATH=T:\TC
    
    :: HELP LANGUAGE=D (Deutsch) or E (English)
    	SET HELPLANGUAGE=E
    
    Download a TC installer, for example tc1050x64.exe
  • Download a TC installer, for example tc1050x64.exe
  • In File Explorer, drag tc1050x64.exe to tc_installer.cmd and drop it.
    When using TC, you will have to 'CTRL + ENTER' the command together
    ( 'CTRL + ENTER' on the script; 'CTRL + ENTER' on the installer; 'ENTER' to execute
    use CTRL + SHIFT + ENTER if you need the path too)
  • Done
TC 10.50 will be installed in T:\TC\tc1050x64 folder and will be automatically started.


tc_installer.cmd

Code: Select all

@echo off & SETLOCAL



:: TC will be installed in INSTALLPATH\versionnumber
	set INSTALLPATH=T:\TC

:: HELP LANGUAGE=D (Deutsch) or E (English)
	SET HELPLANGUAGE=E


IF [%1]==[] (
	echo.
	echo.  No file selected
	pause
goto :EOF 
)


IF exist "%INSTALLPATH%\%~n1\" (
	echo.
	echo.  Folder already exists : "%INSTALLPATH%\%~n1" 
	pause
goto :EOF 
)

	del /Q "%temp%\INSTALL.CAB"
	7za.exe x %1 install.cab -o"%temp%"
	7za.exe x "%temp%\INSTALL.CAB" -o"%INSTALLPATH%\%~n1"

	move "%INSTALLPATH%\%~n1\%HELPLANGUAGE%\*" "%INSTALLPATH%\%~n1\"

(
	echo [Configuration]
	echo UseIniInProgramDir=7
	echo Everything=c:\tools\everything\Everything.exe
	echo DarkMode=2
	echo UseEverything=0
	echo ShowHiddenSystem=1
	echo EverythingForTree=0
) > "%INSTALLPATH%\%~n1\WINCMD.ini"


	del /Q "%temp%\INSTALL.CAB"

	echo.
	echo.    Starting Total Commander ....
	echo.
	
:: Run
	cd /d "%INSTALLPATH%\%~n1\"
	start "" "%INSTALLPATH%\%~n1\TOTALCMD64.exe"


goto :EOF

Only used for 64-bit versions.

EDIT:
7za.exe needs to be accessible.
7za.exe can be downloaded as part of the "7-Zip Extra: standalone console version, 7z DLL, Plugin for Far Manager" package from the 7-zip website.
Post Reply