Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Portable Take Command

Charles Dye

Super Moderator
May
4,948
126
Staff member
Portable Take Command

If you spend much time doing technical work on other people's computers, you may want to use your own licensed, personalized copy of Take Command or TCC. It's not difficult to carry one with you on a removable device. These instructions will walk you through creating a portable, personalized copy of Take Command version 13 on a USB flash drive.


Prerequisites

You will need a working copy of Take Command version 13 already installed on a computer. I'll refer to this computer as the "technician's computer." In addition to a working copy of Take Command, the technician's computer should have a working internet connection.

You will also need a USB flash drive, or some other removable, read-write media. A USB hard drive will not work, because Windows views it as a nonremovable fixed disk (the disk is "fixed" in the drive, even though the drive itself can be disconnected.) A CD-ROM won't work either, because it's a write-once medium. Other removable media such as SD cards or Zip disks can be used, but thumb drives are probably the most convenient; practically every system has USB ports nowadays, but not everyone has a card reader or a Zip drive.)

The flash drive must have a volume serial number; check the first line of a DIR listing to make sure. If the drive does not have a serial number, reformat it. The drive should have enough free space to hold your entire Take Command program directory, plus any other tools you want to carry. 64 megabytes should be plenty in most cases.

Finally, have your registration info ready to register the copy of Take Command on the portable drive.


Instructions

I will assume that your flash drive is E: -- adjust all examples accordingly.


1. Create a directory for Take Command on the flash drive. I use \BIN\TCMD in my examples. If you prefer another name, adjust these instructions to taste.

Code:
md /s e:\bin\tcmd
Also create any other subdirectories desired. Perhaps you would like a UTIL directory for command-line tools and a BAT directory for batch files:

Code:
md e:\bin\util e:\bin\bat


2. Copy all files except .KEY files from the Take Command program directory on the technician's computer to the desired location on the flash drive:

Code:
copy /v /[!*.key] "%@path[%_cmdspec]*" e:\bin\tcmd\
You'll also want your .INI file, which may or may not be in the program directory:

Code:
copy /v "%_ininame" e:\bin\tcmd\tcmd.ini


3. Close all running copies of Take Command and TCC, then start the copy of TCC on the flash drive. Press Win-R to open the RUN dialog, then type the full path to TCC.EXE (e:\bin\tcmd\tcc.exe in my example.) You will be prompted to re-enter your registration information, and a .KEY file will be created on the flash drive. (Again, you need a working Internet connection to complete the registration process.)


4. At this point your should have a startable, licensed copy of Take Command on your flash drive. Dismount it, unplug it, and plug it into another computer to test. Browse to the program directory and right-click on TCC.EXE, then select "Run as administrator" (if the second computer is running Windows XP or earlier, just double-click on TCC.EXE.) TCC's sign-on message should verify that this copy is registered; if you missed it, type VER /R to check.


5. Review the .INI file and remove any lines which are not suitable to portable use. In particular, watch for absolute pathnames. Any directives referring to the hard drive on the technician's computer should probably be removed. (If you absolutely require some directive with an absolute pathname, you can dynamically define it in TCSTART.) Also check for personal info such as passwords. If your USB drive is lost or stolen, directives like MailPassword might come back to haunt you. If you have an FTP.CFG file, consider deleting it from the flash drive.


6. Instead of just copying your existing TCSTART, it's probably a good idea to create a new one from scratch. Since the drive letter assigned to the USB flash drive will vary, one of the first things you need to do in TCSTART is to determine the correct drive letter:

Code:
set usb=%@left[2,%_cmdspec]
If you want to load default aliases from a text file, you will probably keep it in Take Command's program directory:

Code:
alias /r %@path[%_cmdspec]aliases.txt
Review all the aliases in ALIASES.TXT for absolute pathnames; rewrite them relative to %USB or %@PATH[%_CMDSPEC] if appropriate.

If you plan to keep command-line utilities on your USB flash drive, you will want to fix up the search path in TCSTART. Check the path before adding them; otherwise subshells will wind up with multiple references to the same directories in the search path, and flash drives are not terribly fast media.

Code:
if %@index[%path,%usb\bin\util;] == -1 path %usb\bin\util;%usb\bin\bat;%path
Putting the last few suggestions together, your TCSTART file might begin something like this:

Code:
@echo off
prompt $P$g
set usb=%@left[2,%_cmdspec]
alias /r %@path[%_cmdspec]aliases.txt
if %@index[%path,%usb\bin\util;] == -1 path %usb\bin\util;%usb\bin\bat;%path

If you removed any directives using fully-specified filenames from the .INI file, you can now add them to TCSTART as OPTION commands. For example, an FTPCFG=C:\BIN\TC13\FTP.CFG directive could be converted into an OPTION //FTPCFG=%@PATH[%_CMDSPEC]FTP.CFG command in TCSTART. (But this sort of thing should very seldom be necessary; most .INI directives default to Take Command's program directory.)


7. The first time you run Take Command or TCC on another computer, you will have to run it as administrator. Otherwise, TCC is not able to create registry keys which it requires, and you'll get a misleading error message. After the first run, you do not have to run it as administrator (though you probably want to.)
 
Very clear and thorough!

Question about #7: Does TCC _really_ need those registry keys that it creates? I thought they were only needed to keep track of window/pane positions. If so, running as administrator isn't indispensable.
update: Tested: running as administrator is indispensable to succeed running TCMD portably the first time on a new PC, exactly as the tutorial says.

Addendum

Q&A

Q: Can I install portable Take Command 13 using the same method that I used for older versions?
A: No, things have changed enough that portable installation methods which worked for older Take Command versions do not work anymore for version 13.

Q: What format should I use for my USB removable drive?
A: Portable Take Command 13 has been tested to work on FAT32- and NTFS-formatted removable drives; 1GB USB key; 32MB SD card (compressed NTFS with just English language dlls fits and leaves about 4MB free space on the drive).

Q: Can I copy the portable installation folder to a new removable drive and use it?
A: No, unless the new removable drive has the same serial number as the old one. Note: this is not the hardware serial number; this is the serial number that formatting assigns.
 
Thanks. I've fixed your errata in the original post; the addenda can remain in your post, under your name.

What I get when I first start TCC in non-admin mode on a new computer is a your-registration-has-expired dialog, and TCC quits thereafter. I don't know whether that's universally true; but in my own brief testing, I did need to run as admin the first time.
 
Q. What if my thumb drive doesn't have a serial number?

A1. There are tools on the internet which will allow you to set a serial number on such a drive. One such tool can be found at

download.sysinternals.com/Files/VolumeId.zip

A2. If you start with an otherwise unpopulated thumb drive, you can simply format the drive and it will get a serial number.
 
There are tools on the internet which will allow you to set a serial number on such a drive.

I know -- I wrote one myself once, though it won't work under NT.

But a volume with no serial number may have other, more serious issues, so I always recommend reformatting with Microsoft's tools.
 
I know -- I wrote one myself once, though it won't work under NT.

But a volume with no serial number may have other, more serious issues, so I always recommend reformatting with Microsoft's tools.
Good advice, Charles. I've used the Sysinternals tool with no problem, but I see your point.

Your original write-up is great.
 
I don't like the idea of leaving stuff in the registry when using Take Command in "portable" form. Is it permitted to wrap it in PortableApp format so that I can run it "truly" portable? Of course I would make this available to the community for everybody's use.*

*Please understand that this will just be a "wrapper" and that a fully licensed version of Take Command will be need for it to work. See an example here.
 
A very well detailed procedure.

Another option is to use your own personal virtual OS, in my case XP, along with Take Command.

I use MojoPac to achieve this. Click for details.

Using this method, I leave no personal information on the system to which I was attached, and I have Take Command, and my other tools, available for my use.

Joe
 
You can run TCC within Windows PE, though there are a few things that don't work correctly (notably the help, which depends on Internet Explorer.) It works perfectly in BartPE, too, though I think that approach is limited to XP.
 
The instructions for v13 should also work for v14. If you want to use the TPIPE command, you'll also have to register its .DLL on the target computer:

Code:
regsvr32 /s e:\bin\tcmd\textpipeengine.dll
 
The instructions for v13 should also work for v14. If you want to use the TPIPE command, you'll also have to register its .DLL on the target computer:

Code:
regsvr32 /s e:\bin\tcmd\textpipeengine.dll

Charles,

Will the instructions work for TCMD version 15, too?

- Marty
 
Hi,

In the past I followed the procedure to create a portable installation of Take Command (yet at the times of version 14) on my pendrive. It all worked fine. Now, I would like to update this installation, so I run tcmd.exe from the pendrive requesting Administrative rights and tried the "Check for updates" menu item. It turned out, that this function attempted to fetch and install the update ON THE HOST Operating system and not on the pendrive, replacing the older version. How should I proceed to update my pendrive installation of Take Command? On the main system I have even upgraded to version 15, so I would like to have version 15 also on the pendrive ...

Tomasz
 
Look at the updater.ini in the installation folder of TCMD/TCC
 
Do you mean, I should update the paths in that file in the INSTALLED version (on the HOST) to point to my pendrive??? What then about future updates of the HOST iinstallation?
 
Or maybe it would be simpler to redo the procedure:
1. Update on the HOST
2. Remove previous installation from the pendrive
3. Copy newly updated installation from the host and register it again
 
Or maybe it would be simpler to redo the procedure:
1. Update on the HOST
2. Remove previous installation from the pendrive
3. Copy newly updated installation from the host and register it again
If I understood the tutorial correctly, step 3b (registration) requires closing ALL instances of TCC and TCMD on the host before starting the newly installed TCMD on the target. BTW, for recent versions (V14 and later) you MUST use TCMD to register. TCC's OPTION command no longer has a Register tab.
 
Or maybe it would be simpler to redo the procedure:
1. Update on the HOST
2. Remove previous installation from the pendrive
3. Copy newly updated installation from the host and register it again

I think that's the way to go. You probably don't have to remove the old files, though; just overwrite them.
 
I did that, but the TCMD.exe from the pendrive does not accept my activation key. In my case, the key has been purchased yet for version 14 with the free upgrade right to version 15, which I performed on the HOST computer. I am wondering, why my activation key is not accepted ...

The error dialog told, that "The activation key ... does not correspond to version 15.0".

Fortunately, I DIDN'T remove the old files, so I still have my old version on the pendrive :)

Any hints?
 
I did that, but the TCMD.exe from the pendrive does not accept my activation key. In my case, the key has been purchased yet for version 14 with the free upgrade right to version 15, which I performed on the HOST computer. I am wondering, why my activation key is not accepted ...

The error dialog told, that "The activation key ... does not correspond to version 15.0".

Fortunately, I DIDN'T remove the old files, so I still have my old version on the pendrive :)

Any hints?

No, not really. Details of the registration process are known only to Rex, AFAIK. (Did you try deleting all .KEY files on the thumb drive before registering?)
 
One thing you can try is to repeat the "free upgrade" on the pen drive. Did you not receive an emailed v15 activation key for your "free upgrade"? That's probably the one you need to use on the pendrive to register...
 
Following Charles's two-year old instructions, I put v15 on a stick (got a .KEY file and all). I took it to work and tried it on a cluster machine which, no doubt, had never seen TC. I couldn't run it because of security restrictions (IT, you know) but it did get far enough for it to tell me the trial period had expired. I don't know what to make of it. ...?
 
One thing you can try is to repeat the "free upgrade" on the pen drive. Did you not receive an emailed v15 activation key for your "free upgrade"? That's probably the one you need to use on the pendrive to register...
That was it! I forgot, that Rex has sent me a new activation key for version 15 - I used the one for version 14 - my bad!

Case closed - my updated standalone version is now registered
 
I tried this procedure with version 20. Did not work. It appears that version 20 uses a different copy protection scheme from version 13. Bummed.
 
I tried this procedure with version 20. Did not work. It appears that version 20 uses a different copy protection scheme from version 13. Bummed.

You don't need to do this anymore with v20, because it puts the registration in a key file. If TCMD is installed on a removable drive, it will look for the key file in the installation directory.
 
I was able to get it to work. What I did not understand is, the registration on the hard drive does not generate a key file. Registration on a USB does create a key file. The key file appears to be linked to the USB drive's serial number. Thanks.
 
If you're running a recent version of TCMD on a 64-bit system, you will also have a 64-bit TCMD.
If you create a USB-stick from these files, you can't service 32-bit Windows computers (not tested, though).

If you do come across some of these, maybe this script can help.
It's a .BTM that you can run from your aforementioned "technician's computer" to create a 32-bit TCMD that can run on both architectures.
Well ..... you get the base-files. Configuration, registration is like mentioned before by @Charles Dye.
(I'm working on automating that too. Just for the fun of it ...)

The script can be placed (almost) anywhere. As long as you have a writable %TEMP% and a working Internet connection to jpsoft.com, you're good to go.
(And a formatted USB-disk, of course)

Start it without parameters to get the syntax (example: Tcmd2USB.btm 20 e:\TCMD to install the most recent build of Take Command 20 in e:\TCMD\TCMD20\

Afterwards you can remove the files you don't need. But DON'T remove update.cfg. It's essential for further updates!

I tested a rather minimal TCC20, containing the following files
Code:
English.dll
everything.dll
ipworks9.dll
ipworksbt1.dll
ipworksssh9.dll
ipworksssl9.dll
ipworksssnmp9.dll
ipworkszip9.dll
IsLicense50.dll
Lua53.dll
Onig.dll
RegSvrEx32.exe
SciLexer.dll
takecmd.dll
tcc.exception.log
tcc.exe
Didn't find issues so far (but I did miss TCHELP and V.exe)
(Did you notice the missing update.cfg? :-O

Updates.
You can't update in the regular way, like Help > Check for Updtaes or Option /U. It will try to overwrite the 32-bit TCMD with the 64-bit version (at best; probably it just updates the version on the "technician's computer").

If you want to update your USB-stick, just re-run the command above.
If there are updates, they will be installed (Personal files will not be overwritten and base-files you removed in the installation-fase won't come back spontaneous).



That's it. It's a first version, but it seems to work. Have fun with it.



BTW: At the moment I'm testing a Mini (Micro?) TCMD20. It's less than 3.5MB.
Ok ... that's with a little cheating: It's a self extracting archive that automaticly starts the contained TCC.exe (after doing automatic registration and other housekeeping).
It's a lot faster than running from USB-stick. Which I didn't expect. I thought most of the needed code would already be in memory. (But that probably says more about me than about the program ;- ) ...
 

Attachments

  • Tcmd2usb.btm
    9.6 KB · Views: 235

Similar threads

Back
Top