User Tools

Site Tools


userspace:total_commander

This is an old revision of the document!


Total Commander

Adaptation of the opsi-template scripts for Total Commander.
Get it here: http://ghisler.com/download.htm

The last year or so I never had the need to use the 32-bit version on a 64-bit OS, so there is nothing implemented in the scripts for this option. Of course you can easily make a product property.
I downloaded the x86 and x64 versions seperately. Unpack these with Total Commander, and change the install.inf
You might also want to download a few plugins. I use an ISO plugin, a 7-zip plugin, the Imagine (lister) plugin, FTP over SSH plugins and several command-line winrar files.

Tree:
|-- files
|   |-- x64
|   |   |--openssh
|   |   |   |--libeay32.dll
|   |   |   |--libssh2.dll
|   |   |   |--msvcr120.dll
|   |   |   |--readme.txt
|   |   |   |--ssleay32.dll
|   |   |   `--zlib1.dll
|   |   |--plugins
|   |   |--FILE_ID.DIZ
|   |   |--INSTALL.CAB
|   |   |--INSTALL.EXE
|   |   |--INSTALL.INF
|   |   |--INSTALL.LNG
|   |   |--LIESMICH.TXT
|   |   |--README.TXT
|   |   `--TotalCommander.URL
|   |-- x86
|   |   |--openssh
|   |   |   |--libeay32.dll
|   |   |   |--libssh2.dll
|   |   |   |--msvcr120.dll
|   |   |   |--readme.txt
|   |   |   |--ssleay32.dll
|   |   |   `--zlib1.dll
|   |   |--plugins
|   |   |--FILE_ID.DIZ
|   |   |--INSTALL.CAB
|   |   |--INSTALL.EXE
|   |   |--INSTALL.INF
|   |   |--INSTALL.LNG
|   |   |--LIESMICH.TXT
|   |   |--README.TXT
|   |   `--TotalCommander.URL
|   |-- DEFAULT.BAR
|   |-- wcx_ftp.ini
|   `-- wincmd.ini
|-- delsub3264.ins
|-- total-commander.png
|-- setup3264.ins
`-- uninstall3264.ins

DEFAULT.BAR

[Buttonbar]
Buttoncount=0

wcx_ftp.ini

[General]
ConnectRetries=10
WaitDelay=5
transfermode=I
LogFile=
FtpInBackground=0
ModeZ=1
AutoResume=30
[default]
pasvmode=1

wincmd.ini

[Configuration]
FirstTime=0
Keypath=$
ButtonBar=0
ShowHiddenSystem=1
Showicons=1
ShowEXEandLNKicons=0
TrayIcon=1
Savepath=0
Savepanels=0
CountSpace=1
CountMarked=0
AltSearch=1
FirstTimeUnpack=0
FirstTimeZIP=0
pluginbasedir=C:\Program Files\totalcmd\plugins
[Packer]
InternalZipRate=9
RAR=%COMMANDER_PATH%\plugins\wcx\rar\rar.exe
[Colors]
InverseCursor=1
[Layout]
maximized=1
[PackerPlugins]
iso=192,%COMMANDER_PATH%\plugins\wcx\ISO\iso.wcx
nrg=192,%COMMANDER_PATH%\plugins\wcx\ISO\iso.wcx
img=192,%COMMANDER_PATH%\plugins\wcx\ISO\iso.wcx
mdf=192,%COMMANDER_PATH%\plugins\wcx\ISO\iso.wcx
7z=223,%COMMANDER_PATH%\plugins\wcx\7zip\7zip.wcx
[ListerPlugins]
0=%COMMANDER_PATH%\plugins\wlx\Imagine\Imagine.wlx
0_detect="MULTIMEDIA"
[FileSystemPlugins]
Secure FTP=%COMMANDER_PATH%\plugins\wfx\sftpplug\sftpplug.wfx
[Lister]
ShrinkBitmap=2
Maximized=1
CenterBitmap=1
[Tabstops]
0=177
1=179
3=238
4=115
6=528
5=93
AdjustWidth=1

control file

[Package]
version: 3
depends: 
incremental: False
 
[Product]
type: localboot
id: total-commander
name: Total Commander
description: Total Commander is an orthodox file manager.
advice: 
version: 8.51a
priority: 70
licenseRequired: False
productClasses: 
setupScript: setup3264.ins
uninstallScript: uninstall3264.ins
updateScript: 
alwaysScript: 
onceScript: 
customScript: 
userLoginScript: 
 
[Changelog]
total-commander (8.50-1) testing; urgency=low
 
  * Initial package
 
 -- ICT <ict@gcecad-service.nl>  Thu, 03 Apr 2014 22:02:49 +0000

setup3264.ins

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/
;
; License Management removed
 
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
;DefVar $MsiId32$
;DefVar $UninstallProgram32$
;DefVar $MsiId64$
;DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ProductId$  
DefVar $MinimumSpace$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $ExitCode$
DefVar $INST_SystemType$
;DefVar $INST_architecture$
DefVar $INST_MsVersion$
 
set $INST_MsVersion$ = GetMsVersionInfo
Set $INST_SystemType$ = GetSystemType
;set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
;$ProductId$ should be the name of the product in opsi
; therefore please: only lower letters, no umlauts, 
; no white space use '-' as a seperator
Set $ProductId$       = "total-commander"
Set $MinimumSpace$    = "100 MB"
; the path were we find the product after the installation
Set $InstallDir32$      = "%ProgramFiles32Dir%\totalcmd"
Set $InstallDir64$      = "%ProgramFiles64Dir%\totalcmd"
; ----------------------------------------------------------------
 
if not(HasMinimumSpace ("%SystemDrive%", $MinimumSpace$))
	LogError "Not enough space on %SystemDrive%, " + $MinimumSpace$ + " on drive %SystemDrive% needed for " + $ProductId$
	isFatalError
	; Stop process and set installation status to failed
endif
if $INST_MsVersion$ < "5.1"
	LogError "Windows XP or newer is required for " + $ProductId$  
	isFatalError
endif
 
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
 
if FileExists("%ScriptPath%\delsub3264.ins")
	comment "Start uninstall sub section"
	Sub "%ScriptPath%\delsub3264.ins"
endif
 
comment "installing"
 
if ($INST_SystemType$ = "x86 System") 
;and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
	Message "Installing " + $ProductId$ + "..."
	comment "Start setup program"
	Winbatch_install_32
	Sub_check_exitcode
	comment "Copy files"
	Files_install_32 /32Bit
	Files_install_AllProfiles /AllNtUserProfiles
	comment "Patch Registry"
	Registry_install /32Bit
	Registry_install_AllProfiles /AllNTUserDats
	comment "Create shortcuts"
	LinkFolder_install_32
endif
 
if ($INST_SystemType$ = "64 Bit System") 
;and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
	Message "Installing " + $ProductId$ + "..."
	comment "Start setup program"
	Winbatch_install_64
	Sub_check_exitcode
	comment "Copy files"
	Files_install_64 /64Bit
	Files_install_AllProfiles /AllNtUserProfiles
	comment "Patch Registry"
	Registry_install /64Bit
	Registry_install_AllProfiles /AllNTUserDats
	comment "Create shortcuts"
	LinkFolder_install_64
endif
 
 
[Winbatch_install_32]
"%ScriptPath%\files\x86\install.exe"
 
[Files_install_32]
copy -s "%ScriptPath%\files\x86\plugins\*" "$InstallDir32$\plugins"
copy "%ScriptPath%\files\DEFAULT.BAR" "$InstallDir32$"
copy -s "%ScriptPath%\files\x86\openssh\*" "$InstallDir32$"
 
[Winbatch_install_64]
"%ScriptPath%\files\x64\install.exe"
 
[Files_install_64]
copy -s "%ScriptPath%\files\x64\plugins\*" "$InstallDir64$\plugins"
copy "%ScriptPath%\files\DEFAULT.BAR" "$InstallDir64$"
copy -s "%ScriptPath%\files\x64\openssh\*" "$InstallDir64$\64"
 
[Files_install_AllProfiles]
copy "%ScriptPath%\files\wincmd.ini" "%UserProfileDir%\Application Data\GHISLER"
copy -n "%ScriptPath%\files\wcx_ftp.ini" "%UserProfileDir%\Application Data\GHISLER"
; Dit nog aanpassen-> ftp.ini moet gemerged worden!
 
[Registry_install]
openkey [HKEY_LOCAL_MACHINE\Software\Ghisler\Total Commander]
set "key" = REG_BINARY:00 00 00
 
[Registry_install_AllProfiles]
; Remove stored start menu order
deletekey [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu]
 
 
[LinkFolder_install_32]
set_basefolder common_programs
set_subfolder Total Commander
set_link
	name: Total Commander
	target: "$InstallDir32$\Totalcmd.exe"
	parameters:
	working_dir: $InstallDir32$
	icon_file: "$InstallDir32$\Totalcmd.exe"
	icon_index: 0
end_link
 
set_link
	name: Total Commander Help
	target: "$InstallDir32$\Totalcmd.chm"
	parameters:
	working_dir: $InstallDir32$
	icon_file: "%Systemroot%\hh.exe"
	icon_index: 0
end_link
 
set_link
	name: Uninstall or Repair Total Commander
	target: "$InstallDir32$\TCUNINST.EXE"
	parameters:
	working_dir: $InstallDir32$
	icon_file: "$InstallDir32$\TCUNIN64.EXE"
	icon_index: 0
end_link
 
set_basefolder common_desktopdirectory
set_subfolder ""
set_link
	name: Total Commander
	target: "$InstallDir32$\Totalcmd.exe"
	parameters:
	working_dir: $InstallDir32$
	icon_file: "$InstallDir32$\Totalcmd.exe"
	icon_index: 0
end_link
 
[LinkFolder_install_64]
set_basefolder common_programs
set_subfolder Total Commander
set_link
	name: Total Commander 64 Bit
	target: "$InstallDir64$\Totalcmd64.exe"
	parameters:
	working_dir: $InstallDir64$
	icon_file: "$InstallDir64$\Totalcmd64.exe"
	icon_index: 0
end_link
 
set_link
	name: Total Commander Help
	target: "$InstallDir64$\Totalcmd.chm"
	parameters:
	working_dir: $InstallDir64$
	icon_file: "%Systemroot%\hh.exe"
	icon_index: 0
end_link
 
set_link
	name: Uninstall or Repair Total Commander
	target: "$InstallDir64$\TCUNIN64.EXE"
	parameters:
	working_dir: $InstallDir64$
	icon_file: "$InstallDir64$\TCUNIN64.EXE"
	icon_index: 0
end_link
 
set_basefolder common_desktopdirectory
set_subfolder ""
set_link
	name: Total Commander 64 Bit
	target: "$InstallDir64$\Totalcmd64.exe"
	parameters:
	working_dir: $InstallDir64$
	icon_file: "$InstallDir64$\Totalcmd64.exe"
	icon_index: 0
end_link
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
	comment "Looks good: setup program gives exitcode zero"
else
	comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
	if ($ExitCode$ = "1605")
		comment "ERROR_UNKNOWN_PRODUCT	1605	This action is only valid for products that are currently installed."
		comment "Uninstall of a not installed product failed - no problem"
	else
		if ($ExitCode$ = "1641")
			comment "looks good: setup program gives exitcode 1641"
			comment "ERROR_SUCCESS_REBOOT_INITIATED	1641	The installer has initiated a restart. This message is indicative of a success."
		else
			if ($ExitCode$ = "3010")
				comment "looks good: setup program gives exitcode 3010"
				comment "ERROR_SUCCESS_REBOOT_REQUIRED	3010	A restart is required to complete the install. This message is indicative of a success."
			else
				logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
				isFatalError
			endif
		endif
	endif
endif

uninstall3264.ins

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/
;
; License Management removed
 
[Actions]
requiredWinstVersion >= "4.10.8.6"
 
;DefVar $MsiId32$
;DefVar $UninstallProgram32$
;DefVar $MsiId64$
;DefVar $UninstallProgram64$
DefVar $LogDir$
DefVar $ExitCode$
DefVar $ProductId$
DefVar $InstallDir32$
DefVar $InstallDir64$
DefVar $INST_SystemType$
;DefVar $INST_architecture$
 
Set $INST_SystemType$ = GetSystemType
;set $INST_architecture$ = GetProductProperty("install_architecture","system specific")
 
 
Set $LogDir$ = "%SystemDrive%\tmp"
 
; ----------------------------------------------------------------
; - Please edit the following values                             -
; ----------------------------------------------------------------
Set $ProductId$       = "total-commander"
Set $InstallDir32$    = "%ProgramFiles32Dir%\totalcmd"
Set $InstallDir64$    = "%ProgramFiles64Dir%\totalcmd"
; ----------------------------------------------------------------
 
 
comment "Show product picture"
ShowBitmap "%ScriptPath%\" + $ProductId$ + ".png" $ProductId$
 
Message "Uninstalling " + $ProductId$ + " ..."
 
if FileExists("%ScriptPath%\delsub3264.ins")
	comment "Start uninstall sub section"
	Sub "%ScriptPath%\delsub3264.ins"
endif

delsub3264.ins

; Copyright (c) uib gmbh (www.uib.de)
; This sourcecode is owned by uib gmbh
; and published under the Terms of the General Public License.
; credits: http://www.opsi.org/en/credits/
;
; License Management removed
DefVar $UninstallProgram32$
DefVar $UninstallProgram64$
 
Set $UninstallProgram32$ = $InstallDir32$ + "\TCUNINST.exe"
Set $UninstallProgram64$ = $InstallDir64$ + "\TCUNIN64.exe"
 
if ($INST_SystemType$ = "x86 System") 
;and ($INST_architecture$ = "system specific")) or ($INST_architecture$ = "both") or ($INST_architecture$ = "32 only")
	Message "Uninstalling " + $ProductId$ + "..."
 
	if FileExists($UninstallProgram32$)
		comment "Uninstall program found, starting uninstall"
		Winbatch_uninstall_32
		sub_check_exitcode
	endif
 
;	if not (GetRegistryStringValue32("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId32$ + "] DisplayName") = "")
;		comment "MSI id " + $MsiId32$ + " found in registry, starting msiexec to uninstall"
;		Winbatch_uninstall_msi_32
;		sub_check_exitcode
;	endif
 
	comment "Delete files"
	Files_uninstall_32 /32Bit
	comment "Cleanup registry"
	Registry_uninstall /32Bit
	comment "Delete program shortcuts"
	LinkFolder_uninstall_32
endif
 
if ($INST_SystemType$ = "64 Bit System") 
;and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
	Message "Uninstalling " + $ProductId$ + "..."
 
	if FileExists($UninstallProgram64$)
		comment "Uninstall program found, starting uninstall"
		Winbatch_uninstall_64
		sub_check_exitcode
	endif
 
;	if not (GetRegistryStringValue64("[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" + $MsiId64$ + "] DisplayName") = "")
;		comment "MSI id " + $MsiId64$ + " found in registry, starting msiexec to uninstall"
;		Winbatch_uninstall_msi_64
;		sub_check_exitcode
;	endif
 
	comment "Delete files"
	Files_uninstall_64 /64Bit
	comment "Cleanup registry"
	Registry_uninstall /64Bit
	comment "Delete program shortcuts"
	LinkFolder_uninstall_64
endif
 
 
[Winbatch_uninstall_32]
"$UninstallProgram32$" /7
 
[Files_uninstall_32]
delete -sf "$InstallDir32$\"
 
[Winbatch_uninstall_64]
"$UninstallProgram64$" /7
 
[Files_uninstall_64]
delete -sf "$InstallDir64$\"
 
[Registry_uninstall]
deletekey [HKEY_LOCAL_MACHINE\Software\Ghisler\Total Commander]
 
[LinkFolder_uninstall_32]
set_basefolder common_programs
delete_subfolder Total Commander
 
set_basefolder common_desktopdirectory
set_subfolder ""
delete_element Total Commander
 
[LinkFolder_uninstall_64]
set_basefolder common_programs
delete_subfolder Total Commander
 
set_basefolder common_desktopdirectory
set_subfolder ""
delete_element Total Commander 64 Bit
 
[Sub_check_exitcode]
comment "Test for installation success via exit code"
set $ExitCode$ = getLastExitCode
; informations to exit codes see
; http://msdn.microsoft.com/en-us/library/aa372835(VS.85).aspx
; http://msdn.microsoft.com/en-us/library/aa368542.aspx
if ($ExitCode$ = "0")
	comment "Looks good: setup program gives exitcode zero"
else
	comment "Setup program gives a exitcode unequal zero: " + $ExitCode$
	if ($ExitCode$ = "1605")
		comment "ERROR_UNKNOWN_PRODUCT	1605	This action is only valid for products that are currently installed."
		comment "Uninstall of a not installed product failed - no problem"
	else
		if ($ExitCode$ = "1641")
			comment "looks good: setup program gives exitcode 1641"
			comment "ERROR_SUCCESS_REBOOT_INITIATED	1641	The installer has initiated a restart. This message is indicative of a success."
		else
			if ($ExitCode$ = "3010")
				comment "looks good: setup program gives exitcode 3010"
				comment "ERROR_SUCCESS_REBOOT_REQUIRED	3010	A restart is required to complete the install. This message is indicative of a success."
			else
				logError "Fatal: Setup program gives an unknown exitcode unequal zero: " + $ExitCode$
				isFatalError
			endif
		endif
	endif
endif
userspace/total_commander.1401827471.txt.gz · Last modified: 2021/08/23 08:37 (external edit)