Page 1 of 2 12>
Topic Options
#92821 - 2003-09-12 12:52 AM register kixforms.dll in HKCU - no need for admin rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
not sure if this is right forum but...
move the topic if not [Big Grin]

was inspecting some DLL registeration stuff and found out that one can successfully register com interface (i.e. kixforms) in HKCU.
now, as we all know, this means that no admin rights would anymore be needed for the registeration.

and to support old version too, what about registering in HKCU as well as in HKLM?

shawn?
_________________________
!

download KiXnet

Top
#92822 - 2003-09-11 01:52 PM Re: register kixforms.dll in HKCU - no need for admin rights
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ja, knew about that. had some discussion on kfo about it. This only works for NT5 though, so NT4 would be the only wkstn excluded. I think its a great idea, this COM enhancement to registration was was much needed. Interestingly enough, not many COM objects take advantage of it though, can't understand why.

-Shawn

Top
#92823 - 2003-09-11 02:06 PM Re: register kixforms.dll in HKCU - no need for admin rights
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
J./S.

How do I register in HKCU???

J.

2.038K bug????
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#92824 - 2003-09-11 02:24 PM Re: register kixforms.dll in HKCU - no need for admin rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
you can't register in HKCU if the object has hardcoded itself to HKCR.
silly though, but that's the way it goes.

thus, registering to both inside the com would get rid of the need for user worries, no?
_________________________
!

download KiXnet

Top
#92825 - 2003-09-11 02:25 PM Re: register kixforms.dll in HKCU - no need for admin rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
oh, y2.038k bug is basically the thing...
well, every normal c proggy should stop working then [Wink]
nothing more.

quess there is real ref and someone else could give better answer...
_________________________
!

download KiXnet

Top
#92826 - 2003-09-11 11:35 PM Re: register kixforms.dll in HKCU - no need for admin rights
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
There's an article with source and binaries at codeproject where somebody wrote an enhanced version of regsvr32 and he called it RegSvrEx. It allows you to register any dll into HKCU instead of HKLM(HKCR). This will work even if the dll is hardcoded to use HKLM.

It's basically done by using all the standard APIs that regsvr32 uses but it includes an API call named RegOverridePredefKey that will redirect all reg entries from one key to another key.

As Shawn astutely points out, this API call is only available on Win2K and later, so no NT4.

[ 11. September 2003, 23:38: Message edited by: Stevie ]
_________________________
Stevie

Top
#92827 - 2003-09-12 01:58 PM Re: register kixforms.dll in HKCU - no need for admin rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
anyway, not sure...
if you manually register the dll in HKCU, it does not work.
so, what does this do differently?
_________________________
!

download KiXnet

Top
#92828 - 2003-09-12 02:41 PM Re: register kixforms.dll in HKCU - no need for admin rights
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
not sure how it works either, but it works (i just tried it). seems that if you run regsvrex as a user (with the /c switch), it creates all the COM keys under HKCU\Software\Classes.

Then, these HKCU keys are "merged" into the "HKEY_CLASSES_ROOT" and appear just like they would have, if an admin had installed them there.

Very slick.

-Shawn

Top
#92829 - 2003-09-12 03:56 PM Re: register kixforms.dll in HKCU - no need for admin rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
shawn.
if it does what you say, it does not work.
there must be something else.

why?
I placed all the keys in HKCU and they are automatically merged in HKCR.
but that didn't work.
if it does not work manually like that, this tool must do something else.
and what that is?
is it doable without admin rights?
_________________________
!

download KiXnet

Top
#92830 - 2003-09-12 04:23 PM Re: register kixforms.dll in HKCU - no need for admin rights
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
ja, I tried to handjob the keys too and it didn't work. We must be missing something because I don't think regsvrex is doing anything magic. Think that magic happens after the HKCU keys are created and long after regsvrex has exited the building.

-Shawn

Top
#92831 - 2003-09-12 04:31 PM Re: register kixforms.dll in HKCU - no need for admin rights
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
Under XP, I manually added a key to HKCU\Software\Classes and the same key appeared under HKCR. As far as I know, the same thing is supposed to happen with 2K. I don't believe this works under NT, whether you're doing it manually or programmatically but I have no NT boxes right now to test that against.
_________________________
Stevie

Top
#92832 - 2003-09-12 04:41 PM Re: register kixforms.dll in HKCU - no need for admin rights
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
The handjob worked for me under 2000 as well. [Razz]

That key is probably not actively monitored and updated immediately. I would bet if you wait some time or logoff/logon then it may show up under HKCR.
_________________________
Stevie

Top
#92833 - 2003-09-12 04:41 PM Re: register kixforms.dll in HKCU - no need for admin rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
stevie...
ja, from w2k on, the keys added to HKCU are linked to HKCR and even, they have higher "priority"
thus, if you change the settings in HCKU, the HKLM settings should be overlooked.
_________________________
!

download KiXnet

Top
#92834 - 2003-09-12 04:42 PM Re: register kixforms.dll in HKCU - no need for admin rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
still, stevie, what you mean with work?
if you mean that you can see it there, doh.

but manually registering to HKCU does not work.
_________________________
!

download KiXnet

Top
#92835 - 2003-09-12 05:14 PM Re: register kixforms.dll in HKCU - no need for admin rights
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
How are you manually registering a dll? I guess I just don't understand what you're doing. As usual, I'm just a hair too stupid.
_________________________
Stevie

Top
#92836 - 2003-09-12 05:29 PM Re: register kixforms.dll in HKCU - no need for admin rights
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
I think Stevie is talking about handjobbing a few misc keys into HKCU, and the he can see them. I think jlo is talking about handjobbing all the correct Kixforms COM keys into HKCU, and getting Kixforms working ...
Top
#92837 - 2003-09-12 05:38 PM Re: register kixforms.dll in HKCU - no need for admin rights
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
yap.
stevie, registering a dll is nothing but setting some registry keys, AFAIK.

thus a call for regsvr32 or any other external tool is not needed.
this is one of the things (just like removing viruses) where kixtart has a huge strenght.
larger than any tool.
_________________________
!

download KiXnet

Top
#92838 - 2003-09-12 05:49 PM Re: register kixforms.dll in HKCU - no need for admin rights
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
What I suggest you do (ya basta), is to regsvrex kixforms into HKCU, then test it (it works). Then export these keys into a reg file and bob's you uncle. You might find that you have missed some keys. If it doesn't work, then haven't got a clue what the diff between regsvrex'ing and handjobbing poke would be. Shouldn't be any diff really, might have to peek at the regsvrex code or read more about that special api.
Top
#92839 - 2003-09-12 06:09 PM Re: register kixforms.dll in HKCU - no need for admin rights
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
So you have a prefab COM list for kixforms that you're entering into HKCU and it's not working.

And you're right, all COM registrations are nothing more than registry writes, I certainly wasn't trying to debate that point.

OK, I just manually entered the kixforms reg data into HKCU (on XP) and it worked. By manually, I mean executing a .reg file. Haven't tested it against Win2K.

This is a clean system that has never had kixforms on it before.

Here's the contents of the .reg file:
code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes]

[HKEY_CURRENT_USER\Software\Classes\CLSID]

[HKEY_CURRENT_USER\Software\Classes\CLSID\{78F2E57A-21C9-467D-B20B-6836E9A36272}]
@="Drawing Class"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{78F2E57A-21C9-467D-B20B-6836E9A36272}\InprocServer32]
@="C:\\WINDOWS\\system32\\kixforms.dll"
"ThreadingModel"="both"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{78F2E57A-21C9-467D-B20B-6836E9A36272}\ProgID]
@="Kixtart.Forms.Drawing.1"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{78F2E57A-21C9-467D-B20B-6836E9A36272}\VersionIndependentProgID]
@="Kixtart.Forms.Drawing"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{C9A8E0D2-1D16-4EA4-9EA4-54F08D9C0D17}]
@="Dialogs Class"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{C9A8E0D2-1D16-4EA4-9EA4-54F08D9C0D17}\InprocServer32]
@="C:\\WINDOWS\\system32\\kixforms.dll"
"ThreadingModel"="both"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{C9A8E0D2-1D16-4EA4-9EA4-54F08D9C0D17}\ProgID]
@="Kixtart.Forms.Dialogs.1"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{C9A8E0D2-1D16-4EA4-9EA4-54F08D9C0D17}\VersionIndependentProgID]
@="Kixtart.Forms.Dialogs"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{D88DC17F-E372-418C-898F-1D63295D9F0B}]
@="Diagnostics Class"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{D88DC17F-E372-418C-898F-1D63295D9F0B}\InprocServer32]
@="C:\\WINDOWS\\system32\\kixforms.dll"
"ThreadingModel"="both"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{D88DC17F-E372-418C-898F-1D63295D9F0B}\ProgID]
@="Kixtart.Forms.Diagnostics.1"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{D88DC17F-E372-418C-898F-1D63295D9F0B}\VersionIndependentProgID]
@="Kixtart.Forms.Diagnostics"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}]
@="Widget Class"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\InprocServer32]
@="C:\\WINDOWS\\system32\\kixforms.dll"
"ThreadingModel"="both"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\ProgID]
@="Kixtart.Form.1"

[HKEY_CURRENT_USER\Software\Classes\CLSID\{F89DF848-618A-46F9-8A1C-396EA442BDD3}\VersionIndependentProgID]
@="Kixtart.Form"

[HKEY_CURRENT_USER\Software\Classes\Interface]

[HKEY_CURRENT_USER\Software\Classes\Interface\{3C851C45-DA7A-4DD1-AB18-06C2E2F17871}]
@="IDialogs"

[HKEY_CURRENT_USER\Software\Classes\Interface\{3C851C45-DA7A-4DD1-AB18-06C2E2F17871}\ProxyStubClsid]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_CURRENT_USER\Software\Classes\Interface\{3C851C45-DA7A-4DD1-AB18-06C2E2F17871}\ProxyStubClsid32]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_CURRENT_USER\Software\Classes\Interface\{3C851C45-DA7A-4DD1-AB18-06C2E2F17871}\TypeLib]
@="{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}"
"Version"="1.0"

[HKEY_CURRENT_USER\Software\Classes\Interface\{6008D257-6C86-4E22-B65D-EA6102B1F231}]
@="IDrawing"

[HKEY_CURRENT_USER\Software\Classes\Interface\{6008D257-6C86-4E22-B65D-EA6102B1F231}\ProxyStubClsid]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_CURRENT_USER\Software\Classes\Interface\{6008D257-6C86-4E22-B65D-EA6102B1F231}\ProxyStubClsid32]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_CURRENT_USER\Software\Classes\Interface\{6008D257-6C86-4E22-B65D-EA6102B1F231}\TypeLib]
@="{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}"
"Version"="1.0"

[HKEY_CURRENT_USER\Software\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}]
@="IWidget"

[HKEY_CURRENT_USER\Software\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\ProxyStubClsid]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_CURRENT_USER\Software\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\ProxyStubClsid32]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_CURRENT_USER\Software\Classes\Interface\{E0422D09-4293-4CB0-A1BB-5BEBDA481004}\TypeLib]
@="{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}"
"Version"="1.0"

[HKEY_CURRENT_USER\Software\Classes\Interface\{EA4F1802-0541-43ED-817D-5CEBB520BFC0}]
@="IDiagnostics"

[HKEY_CURRENT_USER\Software\Classes\Interface\{EA4F1802-0541-43ED-817D-5CEBB520BFC0}\ProxyStubClsid]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_CURRENT_USER\Software\Classes\Interface\{EA4F1802-0541-43ED-817D-5CEBB520BFC0}\ProxyStubClsid32]
@="{00020424-0000-0000-C000-000000000046}"

[HKEY_CURRENT_USER\Software\Classes\Interface\{EA4F1802-0541-43ED-817D-5CEBB520BFC0}\TypeLib]
@="{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}"
"Version"="1.0"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Form]
@="Widget Class"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Form\CLSID]
@="{F89DF848-618A-46F9-8A1C-396EA442BDD3}"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Form.1]
@="Widget Class"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Form.1\CLSID]
@="{F89DF848-618A-46F9-8A1C-396EA442BDD3}"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Diagnostics]
@="Diagnostics Class"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Diagnostics\CLSID]
@="{D88DC17F-E372-418C-898F-1D63295D9F0B}"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Diagnostics.1]
@="Diagnostics Class"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Diagnostics.1\CLSID]
@="{D88DC17F-E372-418C-898F-1D63295D9F0B}"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Dialogs]
@="Dialogs Class"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Dialogs\CLSID]
@="{C9A8E0D2-1D16-4EA4-9EA4-54F08D9C0D17}"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Dialogs.1]
@="Dialogs Class"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Dialogs.1\CLSID]
@="{C9A8E0D2-1D16-4EA4-9EA4-54F08D9C0D17}"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Drawing]
@="Drawing Class"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Drawing\CLSID]
@="{78F2E57A-21C9-467D-B20B-6836E9A36272}"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Drawing.1]
@="Drawing Class"

[HKEY_CURRENT_USER\Software\Classes\Kixtart.Forms.Drawing.1\CLSID]
@="{78F2E57A-21C9-467D-B20B-6836E9A36272}"

[HKEY_CURRENT_USER\Software\Classes\TypeLib]

[HKEY_CURRENT_USER\Software\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}]

[HKEY_CURRENT_USER\Software\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0]
@="Kixforms 1.0 Type Library"

[HKEY_CURRENT_USER\Software\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\0]

[HKEY_CURRENT_USER\Software\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\0\win32]
@="C:\\WINDOWS\\system32\\kixforms.dll"

[HKEY_CURRENT_USER\Software\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\FLAGS]
@="0"

[HKEY_CURRENT_USER\Software\Classes\TypeLib\{C8DCCD39-471D-4AFD-8EA2-89604A9C6252}\1.0\HELPDIR]
@="C:\\WINDOWS\\system32\\"

_________________________
Stevie

Top
#92840 - 2003-09-12 06:11 PM Re: register kixforms.dll in HKCU - no need for admin rights
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
IMPORTANT: The above sample is for kixforms 2.3.0 beta 3.
_________________________
Stevie

Top
Page 1 of 2 12>


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (mole) and 405 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.209 seconds in which 0.142 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org