[BUG] Desktop shortcut and problem with finding reg. key

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

[BUG] Desktop shortcut and problem with finding reg. key

Post by *djk »

There seems to be a bug in the shortcut for TC which is created in desktop during installation.
The field "Working directory" (I think it's the right name casue I use Polish Windows so it's of course different) is empty. The same field in the shortcut in Menu Start points to TC folder.
When I start TC with this (desktop) shortcut it can't find registration key and shows that TC is unregistered.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

The field "Working directory" (I think it's the right name casue I use Polish Windows so it's of course different) is empty. The same field in the shortcut in Menu Start points to TC folder.
Confirmed
When I start TC with this (desktop) shortcut it can't find registration key and shows that TC is unregistered.
Not confirmed

my wincmd.key is inside TC folder
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

My wincmd.key is also in TC folder.

The problem is probably cause I have an empty entry in wincmd.ini:
keypath=
When I remove this item at all - TC works correctly even run form desktop shortcut.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

I added an empty KeyPath= to my wincmd.ini, run TC from desktop shortcut and i'm still registred user :lol:

even if your wincmd.key inside TC folder and KeyPath=Invalid_path, TC will find registration key and shows that it is registered.
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Strange. Of course the working directory in the shortcut is also empty?
Could anybody else check it? I can reproduce it at my computer all the time.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Why do you use an empty keypath= field? It tells TC to look for the key in the current directory, which will lead to problems if the key isn't in the current dir...
Author of Total Commander
https://www.ghisler.com
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Why? Probably I was testing something with different location of the key. After that I didn't delete whole the entry but only the path.
But it didn't casue any problems. When I start TC with shortcut created by myself it find the key without any problem.
When I run TC with shortcut in Menu Start created during installation it also works correctly - the problem appears only with desktop shortcut cause... it's different (no working directory).

So if you are not going to check it and correct (cause it's really not a big problem- it probably happen only if somebody add such an empty key to wincmd.ini - as I did) you could only add add the working directory to make Menu Start shortcut and Desktop shortcut identical.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

The problem appears only with desktop shortcut cause... it's different (no working directory).
I just did a test install - you are right, there is no working directory set in the shortcut made on the desktop by the Installer - BUT that does NOT prevent a TC started by using the Desktop shortcut from finding MY wincmd.key :!:

Try and double check if the command line in your Desktop shortcut uses a path to a Total Commander installation that actually HAS a keyfile. Maybe you by accident have installed to another location when that shortcut was made?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

2petermad
Thanks for testing it.
Did you also have and empty KeyPath= in your wincmd.ini?

Where is your wincmd.ini located? It probably finds correctly the key if wincmd.ini is in TC folder. My own one is in my profile directory.

Yes I have the key in the right folder :-)
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

you first said
My wincmd.key is also in TC folder.
and now
My own one is in my profile directory.
:? :? :? :roll:

i did the following test:
1- create empty KeyPath= in wincmd.ini
2. moved wincmd.key to C:\somefolder
3- run TC from shortcut with empty working dir, TC cannot find .key file
4- run TC from shortcut with C:\somefolder in working dir, TC now can find .key file


so, i guess the working directory for shortcut in start menu is refering to your profil dir not TC dir. Am i right?
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

2ts4242
I said that my wincmd.key is in my TC folder and wincmd.ini is in my profile folder.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
ts4242
Power Member
Power Member
Posts: 2081
Joined: 2004-02-02, 20:08 UTC
Contact:

Post by *ts4242 »

djk wrote:2ts4242
I said that my wincmd.key is in my TC folder and wincmd.ini is in my profile folder.
Sorry :oops:

what about Installdir key?
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

InstallDir=c:\totalcmd
It's the folder where TC is installed and of course wincmd.key is located.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2djk
Did you also have and empty KeyPath= in your wincmd.ini?
No - I didn't because you wrote:
But it didn't casue any problems. When I start TC with shortcut created by myself it find the key without any problem.
When I run TC with shortcut in Menu Start created during installation it also works correctly - the problem appears only with desktop shortcut cause... it's different (no working directory).
Of course you get a problem with an empty keypath= - I don't consider that a bug.

Where is your wincmd.ini located? It probably finds correctly the key if wincmd.ini is in TC folder. My own one is in my profile directory.
It doesn't matter - my TC finds it no matter where the wincmd.ini is placed - as long as I don't have an empty keypath.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

To make it clear I will try to explain it once again.

1. Shortcuts created during installation in Desktop and in Menu Start are different. In the first one (Desktop) "working directory" is empty.
I think both shortcuts should be the same.

2. If there is an empty key in wincmd.ini KeyPath= (I know it's abnormal) usually everything works ok - TC finds the registration key (located in TC folder) without any problem.

3. The problem in finding the registartion key appears probably only if there are three things at the same time:

- the empty KeyPath= in wincmd.ini
- empty "Working directory" in shortcut to TC
- wincmd.ini is not located in TC folder (in my case it's in my profile folder)

BTW: When I started this thread I didn't know that the problem is related to my strange entry in wincmd.ini. Thanks to ts4242 I've found the probable reason.
So now I think we can say that the problem is explained and assuming that nobody else will have such a strange item in wincmd.ini we can close the thread.
The only thing could be improved is making both the shortcuts the same during installation.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
Post Reply