PDA

View Full Version : Bug: Incorrect registry key when created from GUI



NewsArchive
01-27-2005, 01:42 AM
[Wednesday, January 26, 2005 2:26 AM]

I added a registry key to HKLM using the GUI. RegTree.png shows that entry.
In the script editor the GUI created entry shows HRCR as the root as shown in
RegBadSource.png.

?PNG
?PNG

--
Best regards,

Mark

NewsArchive
01-27-2005, 01:43 AM
[Wednesday, January 26, 2005 8:34 AM]

Mark,

Do you know how to reproduce this?

BTW, to "fix" this you can drag and drop the "Software" key to, say,
HKEY_CLASSES_ROOT and then back to HKEY_LOCAL_MACHINE.

Thanks,
Friedrich

--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910

NewsArchive
01-27-2005, 01:43 AM
[Wednesday, January 26, 2005 8:47 AM]

>Mark,
>
>Do you know how to reproduce this?

I haven't tried to repeat it. When it occurred I had simply followed the
steps necessary to add the key and value to HKLM, and then saw it was HKCR in
the script.

>BTW, to "fix" this you can drag and drop the "Software" key to, say,
>HKEY CLASSES ROOT and then back to HKEY LOCAL MACHINE.

Thanks, but I'll add them manually to the script. A bit a extra care when
dealing with the registry is always worth the effort. :}

--
Best regards,

Mark

NewsArchive
01-27-2005, 01:44 AM
[Wednesday, January 26, 2005 9:03 AM]

Hi Mark,

>>BTW, to "fix" this you can drag and drop the "Software" key to, say,
>>HKEY CLASSES ROOT and then back to HKEY LOCAL MACHINE.
>
> Thanks, but I'll add them manually to the script. A bit a extra care when
> dealing with the registry is always worth the effort. :}

Yes, I understand. But the above drag and drop method fixes this. Under
certain circumstances, the IDE seems to lose the key name. The problem is
that I cannot reproduce this :-(

Thanks again,
Friedrich

--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910

NewsArchive
01-27-2005, 01:44 AM
[Wednesday, January 26, 2005 5:15 PM]

>Hi Mark,
>
>>>BTW, to "fix" this you can drag and drop the "Software" key to, say,
>>>HKEY CLASSES ROOT and then back to HKEY LOCAL MACHINE.
>>
>> Thanks, but I'll add them manually to the script. A bit a extra care when
>> dealing with the registry is always worth the effort. :}
>
>Yes, I understand. But the above drag and drop method fixes this. Under
>certain circumstances, the IDE seems to lose the key name. The problem is
>that I cannot reproduce this :-(

Friedrich,

Assuming it will help to have a script that was in that state, I'll try to do
it again here. If I reproduce it, I'll send the script.

--
Best regards,

Mark

NewsArchive
01-27-2005, 01:45 AM
[Wednesday, January 26, 2005 5:18 PM]

Hi Friedrich,

>Yes, I understand. But the above drag and drop method fixes this. Under
>certain circumstances, the IDE seems to lose the key name. The problem is
>that I cannot reproduce this :-(

Same thing I ran into. I never found any way to reproduce it
reliably. Maybe you could run a check on the registry keys before
compile or during compile to see if they are ok. If not, then add an
error message to the compile window or something.

Best regards,

Arnór Baldvinsson
Icetips Software

NewsArchive
01-27-2005, 01:46 AM
[Wednesday, January 26, 2005 5:40 PM]

Arnór,

It's caused by a very simple bug - but the problem is that I cannot find the
buggy line in our source code. A variable loses the root key id and is set
to "1". But I don't know which function resets this variable (and why).
Perhaps it's the EIP. I ran into this some time ago, but cannot reproduce
it :-(

Thanks,
Friedrich

NewsArchive
01-27-2005, 01:46 AM
[Wednesday, January 26, 2005 5:43 PM]

>Arnór,
>
>It's caused by a very simple bug - but the problem is that I cannot find the
>buggy line in our source code. A variable loses the root key id and is set
>to "1". But I don't know which function resets this variable (and why).
>Perhaps it's the EIP. I ran into this some time ago, but cannot reproduce
>it :-(

Friedrich,

I just tried about a dozen times with a new script and can't get it to
misbehave. If I ever see it again, I'll send the script instead of a couple
of useless images.

--
Best regards,

Mark

NewsArchive
01-27-2005, 01:46 AM
[Wednesday, January 26, 2005 5:47 PM]

Mark,

Thank you!!! And I'll check our source code again.

Friedrich

--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910

NewsArchive
01-27-2005, 01:47 AM
[Wednesday, January 26, 2005 6:01 PM]

>Mark,
>
>Thank you!!! And I'll check our source code again.

Friedrich,

I spoke too soon. I just sent you a script where that condition exists. It
then occurred to me that I may have done something to help the behavior
along. In case that's so, here's what I did this time and the first time I
saw it.

I copied a key name from a WISE script, "Software\RSC\OmniFleet Pro". In SB5,
I selected HKLM, right-click, select key, and paste that string. You want a
node, so it displays the error about bad chars in the string. I past it again
and leave only "Software" in the key. I repeated the process for the next key
using "\RSC\OmniFleet Pro", then finish creating the proper key name and add
the string value named "Install Path" with % SB INSTALLDIR% as data. At that
point I checked the script and had the four HKCR.

HTH.

--
Best regards,

Mark

NewsArchive
01-27-2005, 01:47 AM
[Wednesday, January 26, 2005 6:14 PM]

Mark,

Thank you. This time it worked fine (using your script). It created all
keys under HKLM.

When EIP was active (to enter the Software key, etc.), did you switch to the
Wise app or something like that?

Thanks,
Friedrich

--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910

NewsArchive
01-27-2005, 01:47 AM
[Wednesday, January 26, 2005 6:22 PM]

>Mark,
>
>Thank you. This time it worked fine (using your script). It created all
>keys under HKLM.
>
>When EIP was active (to enter the Software key, etc.), did you switch to the
>Wise app or something like that?

Friedrich,

I had WISE and TextPad open. There was one task switch before beginning key
creation. That was to get the key name onto the clipboard from WISE. From
that point I used the key on the clipboard and modified it as I added the new
keys. There would have been two task switches for the data. One to get the
value name from WISE, and one to get % SB INSTALLDIR% from TextPad.

HTH

--
Best regards,

Mark

NewsArchive
01-27-2005, 01:48 AM
[Wednesday, January 26, 2005 6:25 PM]

Mark,

Thank you. I think it has something to do with the EIP stuff. Working on
this now.

Thanks,
Friedrich

--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910

NewsArchive
01-27-2005, 01:48 AM
[Wednesday, January 26, 2005 7:18 PM]

Hi Friedrich,

>Thank you. I think it has something to do with the EIP stuff. Working on
>this now.

I tend to think this may have something to do with losing/gaining
focus. I'm sure you'll find it:)

Best regards,

Arnór Baldvinsson
Icetips Software

NewsArchive
01-27-2005, 01:51 AM
[Wednesday, January 26, 2005 6:41 PM]

Mark,

I think I can reproduce this now.

1. Select HKLM
2. Switch to, say, the Files and Folder screen and select the "Application
Folder" in the lower left list.
3. Switch back to the Registry screen, right-click and select Key. Press
return and bang...

Thank you for your help. This will be fixed tomorrow.

Friedrich

--
Friedrich Linder
www.lindersoft.com
Fax: 1.954.252.3910

NewsArchive
01-27-2005, 01:51 AM
[Wednesday, January 26, 2005 7:25 PM]

>Mark,
>
>I think I can reproduce this now.
>
>1. Select HKLM
>2. Switch to, say, the Files and Folder screen and select the "Application
> Folder" in the lower left list.
>3. Switch back to the Registry screen, right-click and select Key. Press
> return and bang...
>
>Thank you for your help. This will be fixed tomorrow.

Friedrich,

You da Man! :}

--
Best regards,

Mark