Usb, U3 and Total Commander

English support forum

Moderators: white, Hacker, petermad, Stefan2

User avatar
Hakarien
Junior Member
Junior Member
Posts: 31
Joined: 2003-02-07, 17:10 UTC
Location: Geneva

Usb, U3 and Total Commander

Post by *Hakarien »

Who needs a U3 Usb drive when there is Total Commander ? :D

Well maybe the auto start feature of U3 would be cool... but then just do the following on a regular USB key

1) Put a autorun.inf file at the root of the Key: It should contain:
[AUTORUN]

action=Totalcmd Mobile
action=@Totalcmd\usbtcmd\launch.bat
label=Totalcmd Mobile
icon=Totalcmd\usbtcmd\TCicon.ico

shell\RunTcmd = Launch Total Commander
shell\RunTcmd\command = Totalcmd\usbtcmd\launch.bat

open=Totalcmd\usbtcmd\launch.bat


2) Create a sub folder in Totalcmd named: usbtcmd

3) Put an icon file 128x128 for Tocalcmd in this sub folder; this is TCicon.ico

4) Put a bat file in this sub folder: launch.bat.
This file is:

@echo off
start \TOTALCMD\TOTALCMD.EXE /I=.\wincmd.ini /f=.\wcx_ftp.ini

That's it.

Now unplug your usb device and plug it again

If you closed your TC (certainly by mistake) and like to start it up easily again, at the top level select the usb drive in "Exploser", right click and use the Launch TC menu


If you, like me, want to run other app like Skype from the usb stick without leaving trace on the Host Computer, look at http://forum.skype.com/viewtopic.php?t=25052. This guy's script together with the Junction.exe (http://www.sysinternals.com) are easily adaptable to many other apps


Cheers
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3300
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

yeah but what is the use of this as long as windows
dosnt care about the autorun.inf on the stick/ext. hdd?
Or does Vista?
Hoecker sie sind raus!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Sir_SiLvA wrote:yeah but what is the use of this as long as windows
dosnt care about the autorun.inf on the stick/ext. hdd?
Or does Vista?
XP already does. Install the tweakUI for XP and you'll find in MyComputer->AutoPlay->Types the option: Enable Autoplay for removable drives.

Anywhere here in the forum is a thread with the belonging reg keys so you could enable it for the netdrives, too.

sheepdog

[edit]


Here

[/edit]
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3300
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

Sheepdog wrote:XP already does. Install the tweakUI for XP and you'll find in MyComputer->AutoPlay->Types the option: Enable Autoplay for removable drives.
You didnt got me - I mean wich windows does the Autorun from Stick/ext HDD/etc from the start?
Whats the use of the best Autorun-Configed-USB-Device if the Windows
where I plug is have Autorun disabled ? :D
Hoecker sie sind raus!
User avatar
Hakarien
Junior Member
Junior Member
Posts: 31
Joined: 2003-02-07, 17:10 UTC
Location: Geneva

Post by *Hakarien »

I mean wich windows does the Autorun from Stick/ext HDD/etc from the start?
That is no Windows, that's the bios of the PC and many already do it ! I have Linux on a 128MB boot stick working fine.
Whats the use of the best Autorun-Configed-USB-Device if the Windows where I plug is have Autorun disabled ?
Read the Post. You have then the possibility to fire TC up from the context menu of Explorer.
And why do that instead of clikcing TC? Well, all of you using %Commander_path% in the TC*.ini files and more than the default BAR certailny know the answer. The others probably don't even have a usb stick with TC on it ...
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Thanks for mentioning U3, haven't heard about that before. Sounds very promising. :)

Btw, for a simple start of TC from USB stick you don't need any batch files anymore as there is a new wincmd.ini-switch since TC 6.50:

Code: Select all

UseIniInProgramDir=7
Icfu
This account is for sale
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

icfu wrote:Btw, for a simple start of TC from USB stick you don't need any batch files anymore as there is a new wincmd.ini-switch since TC 6.50:

Code: Select all

UseIniInProgramDir=7
I don't get this one.
This setting is in the .ini file.
How can TC know which ini to use (those in his dir, in this example) when that information is in the ini file itself?
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

solid wrote:
icfu wrote:Btw, for a simple start of TC from USB stick you don't need any batch files anymore as there is a new wincmd.ini-switch since TC 6.50:

Code: Select all

UseIniInProgramDir=7
I don't get this one.
This setting is in the .ini file.
How can TC know which ini to use (those in his dir, in this example) when that information is in the ini file itself?
When TC starts it looks in its program dir if there is a wincmd.ini and if it contains this key. If not it tries to take the location out of the registry and if there is no registry-key it takes the ini in the %windir% or creates there a knew.

If the ini file in the program dir contains this key, TC takes this wincmd.ini.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

Sheepdog wrote: When TC starts it looks in its program dir if there is a wincmd.ini and if it contains this key. If not it tries to take the location out of the registry and if there is no registry-key it takes the ini in the %windir% or creates there a knew.

If the ini file in the program dir contains this key, TC takes this wincmd.ini.

sheepdog
Now i get it, thanks.
But what if the .ini exists in the TC dir, but this key doesn't. Does it means that TC will ignore this .ini file and search for and use the one specified in registry?
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2solid
But what if the .ini exists in the TC dir, but this key doesn't. Does it means that TC will ignore this .ini file and search for and use the one specified in registry?
Yes it does and even if the key exists it doesn't mean the ini file is used. It depends on the key value...

Although it's more from a plugin developers view this thread could be interesting for you:
http://www.ghisler.ch/board/viewtopic.php?t=8763
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

2Lefteous
Lefteous wrote: Yes it does and even if the key exists it doesn't mean the ini file is used. It depends on the key value...

Although it's more from a plugin developers view this thread could be interesting for you:
http://www.ghisler.ch/board/viewtopic.php?t=8763
Thanks for clearing this out.
I'll stick to the /i parameter :)
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Post by *solid »

One more thing.
When and from where the variable %Commander_path% gets its value?

Is it from the location and the moment when it is started?
User avatar
Sir_SiLvA
Power Member
Power Member
Posts: 3300
Joined: 2003-05-06, 11:46 UTC

Post by *Sir_SiLvA »

solid wrote:One more thing.
When and from where the variable %Commander_path% gets its value?
Is it from the location and the moment when it is started?
It Gets its value from Totalcmd.exe and is usable with Params like /i and /f.
When you start totalcmd.exe the Var is set to the path where the totalcmd.exe is.
Hoecker sie sind raus!
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

solid wrote:Is it from the location and the moment when it is started?
Yes. And it's only set for programs startet from within TC.

If you go to the Windows 'Start'->Run and type cmd and the 'set ' command on the commandline will not find the %commander_path% set. If open the DOS Box from within TC you will find it properly set. And if you run two or more TC instance from different installations you'll get different values in each TC.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Lefteous
Power Member
Power Member
Posts: 9535
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Sheepdog
If you go to the Windows 'Start'->Run and type cmd and the 'set ' command on the commandline will not find the %commander_path% set.
I tried that and it worked fine for me.
OK I killed explorer.exe before and restarted it from within TC :mrgreen:
Post Reply