LonkeroAdministrator
(KiX Master Guru)
2003-09-12 12:52 AM
register kixforms.dll in HKCU - no need for admin rights

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?


ShawnAdministrator
(KiX Supporter)
2003-09-11 01:52 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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


MightyR1
(MM club member)
2003-09-11 02:06 PM
Re: register kixforms.dll in HKCU - no need for admin rights

J./S.

How do I register in HKCU???

J.

2.038K bug????


LonkeroAdministrator
(KiX Master Guru)
2003-09-11 02:24 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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?


LonkeroAdministrator
(KiX Master Guru)
2003-09-11 02:25 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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...


Stevie
(Starting to like KiXtart)
2003-09-11 11:35 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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 ]


LonkeroAdministrator
(KiX Master Guru)
2003-09-12 01:58 PM
Re: register kixforms.dll in HKCU - no need for admin rights

anyway, not sure...
if you manually register the dll in HKCU, it does not work.
so, what does this do differently?


ShawnAdministrator
(KiX Supporter)
2003-09-12 02:41 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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


LonkeroAdministrator
(KiX Master Guru)
2003-09-12 03:56 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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?


ShawnAdministrator
(KiX Supporter)
2003-09-12 04:23 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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


Stevie
(Starting to like KiXtart)
2003-09-12 04:31 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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
(Starting to like KiXtart)
2003-09-12 04:41 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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.


LonkeroAdministrator
(KiX Master Guru)
2003-09-12 04:41 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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.


LonkeroAdministrator
(KiX Master Guru)
2003-09-12 04:42 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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.


Stevie
(Starting to like KiXtart)
2003-09-12 05:14 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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.

ShawnAdministrator
(KiX Supporter)
2003-09-12 05:29 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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 ...

LonkeroAdministrator
(KiX Master Guru)
2003-09-12 05:38 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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.


ShawnAdministrator
(KiX Supporter)
2003-09-12 05:49 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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.

Stevie
(Starting to like KiXtart)
2003-09-12 06:09 PM
Re: register kixforms.dll in HKCU - no need for admin rights

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
(Starting to like KiXtart)
2003-09-12 06:11 PM
Re: register kixforms.dll in HKCU - no need for admin rights

IMPORTANT: The above sample is for kixforms 2.3.0 beta 3.

LonkeroAdministrator
(KiX Master Guru)
2003-09-12 08:05 PM
Re: register kixforms.dll in HKCU - no need for admin rights

so that it was.
me basta missed some stupid value or something.


ShaneEP
(MM club member)
2011-09-19 08:44 PM
Re: register kixforms.dll in HKCU - no need for admin rights

Just FYI for anyone else that happens upon this post. So far I have not been able to get Regsvrex.exe to work on Vista. Manually writing the registry keys that regsvr32 writes (except to HKCU vs HKLM) also does not work. Returns an 'invalid class' error.

KIXKicks
(Starting to like KiXtart)
2012-03-28 06:08 PM
Re: register kixforms.dll in HKCU - no need for admin rights

ShaneEP,

That is unfortunate, being able to register kixforms.dll without Admin Rights would be a very nice upgrade of kixforms.


LonkeroAdministrator
(KiX Master Guru)
2012-03-28 07:14 PM
Re: register kixforms.dll in HKCU - no need for admin rights

hmm... wonder if UAC or other vista/win7 program diverting features kick in.
I've written some softwares that worked just fine as useronly installs, but I built them as such from the scratch.

anyways... was reading a bit on it.
one example: http://stackoverflow.com/questions/1002709/detecting-registry-virtualization

basicly, you are screwed \:\)


ShaneEP
(MM club member)
2012-03-28 09:35 PM
Re: register kixforms.dll in HKCU - no need for admin rights

Yea I gave up on it after I posted that. Fortunately, for what I use kixforms for, there are only about 8 computers. So I just manually registered kixforms on all of them lol.

LonkeroAdministrator
(KiX Master Guru)
2012-03-29 04:58 AM
Re: register kixforms.dll in HKCU - no need for admin rights

this is where .net support for kix would be really likable. :P (if that's even a word)

pkboe
(Just in Town)
2017-04-11 02:38 PM
Re: register kixforms.dll in HKCU - no need for admin rights

Yes, very Old thread, but:

All information about registering kixforms.dll without admin rights(I use 2.47)
was helpful for me to get success running WIN7 64bit.

First I import the reg information above:

$SETCOMMAND = "reg import c:\kix32\kixforms.reg"
SHELL $SETCOMMAND

then

$SETCOMMAND = "c:\kix32\regsvrex.exe /c c:\kix32\kixforms.dll"
SHELL $SETCOMMAND

(regsvrex.exe was downloaded from "CodeProject")

The regsvrex.exe command shows an error, but anyway the forms can now be used.

Perhaps it helps someone,
Georg