version 13 portable installation

May 31, 2008
382
2
#1
Apparently the portable installation failed here.
On a clean Windows XP SP3 I installed version 13.0.0.21 to an external USB hard disk.

Take one
I specified a SUBSTituted drive as installation folder. The SUBST pointed to the truename USB path. Installation failed in Installation progress / Registering modules... with message
V:\bin\TCMD13\IsLicense50.dll failed to register. HRESULT -2147024770. Contact your support personnel.
Abort.

Take two
This time I installed to the truename USB folder path. All went well. Then I ran TCMD and entered my registration keys and registration was successful. I restarted TCMD a few times, all was OK.

Portable
Then I moved my USB hard disk to another PC. When I started TCC it came up unregistered, and so did TCMD. The What's New help section says
Take Command now supports installation and registration on removable (for example, USB) drives. At startup, Take Command will determine whether it is running on a removable drive; if so it will read / write its registration info to a key file in the Take Command installation directory. For example, this allows you to move your registered copy of Take Command among different machines by installing it to a USB thumb drive
But there is no key file in my TCMD13 folder.
I checked the Windows Registry of the second PC and isLicense50.dll is correctly registered. I unregistered it with regsvr and started TCMD again. It came up unregistered. Then I checked the rRegistry and isLicense50.dll was registered, so TCMD performed that bit correctly. But the portable version is still unregistered overall.
On searching the first PC for a TCMD .key file I found none.
So, how do I make this version portable?
Note that the truename USB drive letter and path are exactly the same on both PCs.
 

rconn

Administrator
Staff member
May 14, 2008
10,597
97
#2
> Apparently the portable installation failed here.
First, check to see if Windows considers your USB drive to be removable.
This depends on your driver; many (but not all) external USB hard disks say
they are "fixed".

If you don't have a .key file in your installation directory, then your
drive is probably saying it's fixed.
 
May 31, 2008
382
2
#3
First, check to see if Windows considers your USB drive to be removable.
If you don't have a .key file in your installation directory, then your
drive is probably saying it's fixed.
Correct, my USB disk says it's fixed.

So I reinstalled TCMD13 to my USB hard disk drive H: as follows:
1. Get a USB stick S: (Windows must report it as a removable drive)
2. Copy H:\TCMD13\ to H:\TCMD13.bak\
3. Uninstall H:\TCMD13
4. Install and register S:\TCMD13
5. Copy S:\TCMD13\* to H:\TCMD13.bak\
6. Uninstall S:\TCMD13\
7. Rename H:\TCMD13.bak to H:\TCMD13\ which is now fully registered and portable.
 
May 31, 2008
382
2
#4
which is now fully registered and portable.
Not quite portable, yet. When I connected the USB hard disk to another PC (the "portable PC"), TCC came up unregistered with 29 days left in my evaluation period.
The portable PC is the same one as yesterday; I have only used it to run TCMD portably without ever fully installing TCMD on it. So why does the portable TCMD say that I have 29 days left instead of 30 days? Is 29 stored somewhere in the portable PC Registry?
 
May 31, 2008
382
2
#5
I edited yesterday's post and included it below. Does anyone have a suggestion on how to make a portable TCMD folder run portably?

Not quite portable, yet. When I connected the USB hard disk to another PC (the "portable PC"), TCC came up unregistered with 29 days left in my evaluation period.
The portable PC is the same one as yesterday; I have only used it to run TCMD portably without ever fully installing TCMD on it. So why does the portable TCMD say that I have 29 days left instead of 30 days? Is 29 stored somewhere in the portable PC Registry?
 
May 20, 2009
233
1
54
ITALY
#6
I my case it worked. Using my laptop, where I have setup TakeCommand 13 build 22, I copied the whole directory to an external usb key. From the same laptop I closed other instances of TakeCommand and I ran the on on the key. It appeared as not registered, so I entered my data. Then, I moved the key to another desktop, and there too it was registered.


Regards

Rodolfo Giovanninetti
 
May 31, 2008
382
2
#7
I moved the key to another desktop, and there too it was registered.
I think my issue is that the first time I moved my USB hard disk with the portable TCMD13 folder from desktop 1 to desktop 2, TCMD marked desktop 2 as unregistered because TakeCommand.13.0.key was missing. Now even though TakeCommand.13.0.key is in the portable folder, TCMD "remembers" desktop 2 as being unregistered, day after day. I don't know how to make TCMD "forget" that and recognize that desktop 2 is using a portable folder.
 

rconn

Administrator
Staff member
May 14, 2008
10,597
97
#8
I think my issue is that the first time I moved my USB hard disk with the portable TCMD13 folder from desktop 1 to desktop 2, TCMD marked desktop 2 as unregistered because TakeCommand.13.0.key was missing. Now even though TakeCommand.13.0.key is in the portable folder, TCMD "remembers" desktop 2 as being unregistered, day after day. I don't know how to make TCMD "forget" that and recognize that desktop 2 is using a portable folder.
Not reproducible here.

When TCMD starts, it first looks to see whether its installation directory is on a removable drive. If not, everything goes through the registry.

If it is on a removable drive, TCMD looks for the key file. If that is found, TCMD reads the user name & key from the file. If the key file is not found or the name & key can't be read, TCMD will not look in the registry; it simply assumes that it is an eval version. (So if you have TCMD on a removable drive, you *must* have a valid TakeCommand.13.0.key file in the TCMD directory.)

If TCMD is not on a removable drive (as defined by Windows), then it always looks in the registry, regardless of whether there is a key file present.
 
#9
On Fri, 16 Sep 2011 09:38:26 -0400, rconn <> wrote:

|Not reproducible here.
|
|When TCMD starts, it first looks to see whether its installation directory is on a removable drive. If not, everything goes through the registry.
|
|If it is on a removable drive, TCMD looks for the key file. If that is found, TCMD reads the user name & key from the file. If the key file is not found or the name & key can't be read, TCMD will not look in the registry; it simply assumes that it is an eval version. (So if you have TCMD on a removable drive, you *must* have a valid TakeCommand.13.0.key file in the TCMD directory.)
|
|If TCMD is not on a removable drive (as defined by Windows), then it always looks in the registry, regardless of whether there is a key file present.

I played with this a little and can't figure it out. I have a
takecommand.13.0.key from 8/5 in my install directory (on d: a fixed internal
drive). So apparently you get a KEY file for any installation/registration ...
right?

But that key file doesn't work elsewhere. If I copy my TCMD install to an
external HD and to a stick, neither work on another machine. The one on an
external HD (@removable[] = 0) comes up with 30 days left. The one on a stick
(@removable[] = 1) comes up expired.

So, with TCMD already installed on a fixed, internal drive, can I get a portable
TCMD on the external HD (removable = 0) ... how ... can I get a portable TCMD on
a stick (removable = 1) ... how?

Some explicit, step-by-step instructions seem to be needed.
 
May 31, 2008
382
2
#11
If TCMD is not on a removable drive (as defined by Windows), then it always looks in the registry, regardless of whether there is a key file present.
What this says is that TCMD is portable on a memory stick but not on an external USB hard disk, since Windows doesn't define a USB disk as removable. How sad.
 

rconn

Administrator
Staff member
May 14, 2008
10,597
97
#12
I played with this a little and can't figure it out. I have a
takecommand.13.0.key from 8/5 in my install directory (on d: a fixed internal drive). So apparently you get a KEY file for any installation/registration ... right?
Wrong. You have an old key file from a beta build (which did try to create one in every installation). That won't work in the release builds.
 
May 31, 2008
382
2
#13
I have a
takecommand.13.0.key from 8/5 in my install directory (on d: a fixed internal
drive). So apparently you get a KEY file for any installation/registration ...
right?
Well, no. TCMD 13.0.0.21 didn't create a key file when I first installed to an external USB hard disk. To get a key file I had to uninstall and re-install to a USB memory stick.
 

rconn

Administrator
Staff member
May 14, 2008
10,597
97
#15
What this says is that TCMD is portable on a memory stick but not on an external USB hard disk, since Windows doesn't define a USB disk as removable. How sad.
Not necessarily true for the USB hard disks; it depends on your disk driver.

Using key files on all fixed hard disks would (1) not work in Windows 7 if the user installed TCMD in the default "Program Files" directory, and (2) measurably slow down the TCC startup (which would make Vince go berserk).
 
#17
On Fri, 16 Sep 2011 09:57:45 -0400, Charles Dye <> wrote:

|---Quote (Originally by vefatica)---
|So, with TCMD already installed on a fixed, internal drive, can I get a portable TCMD on the external HD (removable = 0) ... how ... can I get a portable TCMD on a stick (removable = 1) ... how?
|---End Quote---
|Delete the .KEY file. Plug the stick into a machine which does not have Take Command installed. Run TCmd and register it.

So it doesn't become truly portable until it has been used portably once (?).
That's a tad inconvenient.

And you can't put it (portably) on portable things which come up with
removable = 0 ... right? That's worse than inconvenient.
 
#18
On Fri, 16 Sep 2011 10:08:00 -0400, Stefano Piccardi <>
wrote:

|---Quote (Originally by vefatica)---
|I have a
|takecommand.13.0.key from 8/5 in my install directory (on d: a fixed internal
|drive). So apparently you get a KEY file for any installation/registration ...
|right?
|---End Quote---
|Well, no. TCMD 13.0.0.21 didn't create a key file when I first installed to an external USB hard disk. To get a key file I had to uninstall and re-install to a USB memory stick.

So, say I just bought TCMD with multiple licenses (never installed anywhere) and
I want a portable installation on a stick and a permanent one too. I
install/register on the stick, giving me a ready-to-go utterly portable
installation ... then (having removed the stick) I install/register again on the
local machine. That'll work?

And it just doesn't hapen on a (portable) "non-removable" device?
 
#19
On Fri, 16 Sep 2011 10:09:26 -0400, rconn <> wrote:

|Using key files on all fixed hard disks would (1) not work in Windows 7 if the user installed TCMD in the default "Program Files" directory, and (2) measurably slow down the TCC startup (which would make Vince go berserk).

You're right there!

I don't know if you could do this while protecting your interests, but might it
possible (in a future version) to simply make a portable **copy** on demand
(without going through an installation process); i.e., simply generate a KEY
file (for a specific portable device) on demand?
 

rconn

Administrator
Staff member
May 14, 2008
10,597
97
#20
So, say I just bought TCMD with multiple licenses (never installed anywhere) and I want a portable installation on a stick and a permanent one too. I install/register on the stick, giving me a ready-to-go utterly portable installation ... then (having removed the stick) I install/register again on the local machine. That'll work?
Yes.

And it just doesn't hapen on a (portable) "non-removable" device?
If you know a magical way of determining when a fixed drive is actually a removable drive, I'm all ears ...
 
May 31, 2008
382
2
#21
If you know a magical way of determining when a fixed drive is actually a removable drive, I'm all ears ...
I know no magic, but I notice that my USB hard disk is listed in the Windows safely remove dialog. So some Windows API does know that this is a removable drive, even though some other Windows API doesn't agree.To me for all practical purposes, "listed in Safely Remove dialog" <=> "removable".
 
Jan 24, 2009
36
0
#22
Ask the user.




Sent from my Verizon Wireless 4GLTE smartphone

----- Reply message -----
From: "rconn" <>
To: <[email protected]>
Subject: [Support-t-3206] Re: version 13 portable installation
Date: Fri, Sep 16, 2011 10:55 am


---Quote (Originally by vefatica)---
So, say I just bought TCMD with multiple licenses (never installed anywhere) and I want a portable installation on a stick and a permanent one too. I install/register on the stick, giving me a ready-to-go utterly portable installation ... then (having removed the stick) I install/register again on the local machine. That'll work?
---End Quote---

Yes.


---Quote---
And it just doesn't hapen on a (portable) "non-removable" device?
---End Quote---

If you know a magical way of determining when a fixed drive is actually a removable drive, I'm all ears ...
 
#23
On Fri, 16 Sep 2011 10:55:58 -0400, rconn <> wrote:

|If you know a magical way of determining when a fixed drive is actually a removable drive, I'm all ears ...

WMI knows the difference between the physical devices. I don't know about
matching them to logical devives.

v:\> wmiquery /a . "select mediatype from win32_diskdrive"
Fixed hard disk media
Fixed hard disk media
Removable Media
External hard disk media

v:\> wmiquery /a . "select capabilities from win32_diskdrive"
{3,4,10}
{3,4,10}
{3,4,7}
{3,4}

v:\> wmiquery /a . "select caption from win32_diskdrive"
ST380815AS ATA Device
ST380815AS ATA Device
Generic STORAGE DEVICE USB Device
WD 2500BEV External USB Device

Here are all the properties for the WD HD:

BytesPerSector = 512
Capabilities = {3,4}
CapabilityDescriptions = {Random Access,Supports Writing}
Caption = WD 2500BEV External USB Device
ConfigManagerErrorCode = 0
ConfigManagerUserConfig = False
CreationClassName = Win32_DiskDrive
Description = Disk drive
DeviceID = \\.\PHYSICALDRIVE2
FirmwareRevision = 1.05
Index = 2
InterfaceType = USB
Manufacturer = (Standard disk drives)
MediaLoaded = True
MediaType = External hard disk media
Model = WD 2500BEV External USB Device
Name = \\.\PHYSICALDRIVE2
Partitions = 1
PNPDeviceID = USBSTOR\DISK&VEN_WD&PROD_2500BEV_EXTERNAL&REV_1.05\575845353038434
A33353233&0
SectorsPerTrack = 63
SerialNumber = WD-WXE508CJ3523
Signature = 1533724230
Size = 250056737280
Status = OK
SystemCreationClassName = Win32_ComputerSystem
SystemName = ZZ
TotalCylinders = 30401
TotalHeads = 255
TotalSectors = 488392065
TotalTracks = 7752255
TracksPerCylinder = 255

And here are the properties of the logical disk assigned to it. I don't see an
obvious way to match them.

v:\> wmiquery /a . "select * from win32_logicaldisk where name = 'm:'"
Access = 0
Caption = M:
Compressed = False
CreationClassName = Win32_LogicalDisk
Description = Local Fixed Disk
DeviceID = M:
DriveType = 3
FileSystem = NTFS
FreeSpace = 64679657472
MaximumComponentLength = 255
MediaType = 12
Name = M:
QuotasDisabled = True
QuotasIncomplete = False
QuotasRebuilding = False
Size = 68722180096
SupportsDiskQuotas = True
SupportsFileBasedCompression = True
SystemCreationClassName = Win32_ComputerSystem
SystemName = ZZ
VolumeDirty = False
VolumeName = WD
VolumeSerialNumber = 8EE31D6F

There's also:

v:\> wmiquery /a . "select * from win32_logicaldisktopartition"

(several snipped; these are the WD and the stick)

Antecedent = \\ZZ\root\cimv2:Win32_DiskPartition.DeviceID="Disk #2, Partition
#0"
Dependent = \\ZZ\root\cimv2:Win32_LogicalDisk.DeviceID="M:"
EndingAddress = 68722214399
StartingAddress = 32256
Antecedent = \\ZZ\root\cimv2:Win32_DiskPartition.DeviceID="Disk #3, Partition
#0"
Dependent = \\ZZ\root\cimv2:Win32_LogicalDisk.DeviceID="N:"
EndingAddress = 131071999
StartingAddress = 16384
 
#26
From: rconn
| If you know a magical way of determining when a fixed drive is
| actually a removable drive, I'm all ears ...

Suppose you treat ALL drives as if they were removable... This would not result in licensing ineligible copies of TCMD, would simplify both the registration and the validation software, and satisfy all users.
--
Steve
 

rconn

Administrator
Staff member
May 14, 2008
10,597
97
#27
Suppose you treat ALL drives as if they were removable... This would not result in licensing ineligible copies of TCMD, would simplify both the registration and the validation software, and satisfy all users.
Not exactly -- it would satisfy all users who (1) only ran XP (and who are never, ever going to upgrade their Windows version), and (2) who don't care that TCC will be twice as slow to load.

Which is probably < 1% of our users.
 
May 31, 2008
382
2
#28
might it
possible (in a future version) to simply make a portable **copy** on demand
(without going through an installation process); i.e., simply generate a KEY
file (for a specific portable device) on demand?
And TCMD would not check whether it's running from a portable (as defined by Windows) drive anymore, right? Because that's the current problem. Now the installation generates a key file which is supposedly valid for all portable devices, but then the start up code restricts the use of the key to a sub-class of portable devices, that is only devices that a certain Windows API considers 'removable'.

Rex, couldn't you just add a startup switch /PORT that tells TCMD to run portably - regardless of the drive type fixed/portable/removable, provided that there's a .key file? That should work for the Windows 7 Program Files folder. I'm hoping that testing for /PORT wouldn't slow startup noticeably and make Vince go berserk!

BTW, I like how much faster v13 startup time is in comparison with v9, which I was using before. It's very noticeable.
 
#29
Rex wrote: "If you know a magical way of determining when a fixed drive is actually a removable drive, I'm all ears ..."

Stefano Piccardi pointed me to:

http://www.codeproject.com/KB/winsdk/usbdisks.aspx

That code is just a tad flawed, but it did allow me to make a plugin.

v:\> uhelp @isusb
@ISUSB[drive_letter] = 1|0

There's no enumeration, only CreateFile() and DeviceIoControl(). It gets it right here:

Code:
v:\> echo %@isusb[c] (fixed internal)
0

v:\> echo %@isusb[m] (WD external HD)
1

v:\> echo %@isusb[n] (stick)
1
If this would be useful I'll post or send the code.
 
May 31, 2008
382
2
#30
Not reproducible here.

When TCMD starts, it first looks to see whether its installation directory is on a removable drive. If not, everything goes through the registry.

If it is on a removable drive, TCMD looks for the key file. If that is found, TCMD reads the user name & key from the file. If the key file is not found or the name & key can't be read, TCMD will not look in the registry; it simply assumes that it is an eval version. (So if you have TCMD on a removable drive, you *must* have a valid TakeCommand.13.0.key file in the TCMD directory.)

If TCMD is not on a removable drive (as defined by Windows), then it always looks in the registry, regardless of whether there is a key file present.
Here's another portable installation issue.
I plugged in a removable USB key into my laptop. It's removable because @removable[] returns 1.
This laptop has run TCMD 13.00.21 before from a (non-removable by Windows) external hard disk drive. TCMD 13.00.21 reported 20 trial days left.

Now I successfully INSTALL version 13.00.23 to the USB key on this laptop. Then I run TCC from the USB key and it says that the evaluation period was expired, while I expect it to report 20 days left, or maybe 30, but definitely not zero.
Anyway, I register the product and restart TCC a few times - always from the USB key, and always it comes up registered. So far so good.

Then I plug in ANOTHER, removable USB key, and copy the TCMD13 folder from the first USB key to the second one, including the registration key file.

In the current TCC session (first USB key) type: SHRALIAS /U & EXIT.
Start TCC from the SECOND USB key. It says that my evaluation period has expired. So it seems like the portable folder is bound to the first USB key only.
What gives?