NickStuart
Posts: 8
Joined: Mon Jun 21, 2004 6:15 pm

Not overwriting reg keys

Hello all,
I'm having a problem with reg keys. I'm registering a DLL as well as adding some custom key/values under the same dll key. My problem is that the default value (which I've setup in AI) for the id (the long string in { } ) keeps getting over written when the dll is register to the name/description of the dll itself.

Is there anyway to register the dll first, and then add the custom keys?Which I think would solve the problem.
NickStuart
Posts: 8
Joined: Mon Jun 21, 2004 6:15 pm

Not executing vbscripts

And in my attempt to fix this issue I'm trying to run a vbscript file to write to the registry but that is not working either. I keep getting an error on the install, even though I can run the exact same script file fine outside of the install and it works.
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Hi Nick,

Actually, Microsoft advises against registering DLLs. Instead, it recommends including all the registry keys with your installation. I think that would solve your problem, right?

As for VB scripts, the VBS engine included with Windows Installer is a simplified, customized one. You need to carefully specialize your scripts to get them to work...

Best regards,
Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
NickStuart
Posts: 8
Joined: Mon Jun 21, 2004 6:15 pm

Hmm...first time I've heard that one. So I have to manually copy all of the registry fields that get created when I register the DLL and past them in AI? That seems kind of silly. Maybe an "import key" feature would make this easier but right now that seems like a pain in the butt. (And I only have one DLL to register, can't imagine what other folks do with a lot more)
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Well, that's what it says in the Platform SDK, under Windows Installer/SelfReg table:
Installation package authors are strongly advised against using self registration. Instead they should register modules by authoring one or more tables provided by the installer for this purpose. For more information, see Registry Tables Group. Many of the benefits of having a central installer service are lost with self registration because self-registration routines tend to hide critical configuration information. Reasons for avoiding self registration include: [...]
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
NickStuart
Posts: 8
Joined: Mon Jun 21, 2004 6:15 pm

Ok, well it makes sense (what the SDK says) but I guess I'm at a loss on what people do instead. Everything I find about using dll's talk about regsvr32 in the same sentence. (this is what I'm assuming you are saying about registering dlls)

How do I NOT register the DLL (using regsvr32 or the auto register in AI)but still use it? A link to the appropriate howto/article/whatever would be more then enough. Maybe I'm just confused here on whats going on, but I'm missing a step somewhere.
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Usually, what the registration of a DLL does is to create all the required registry keys.

So add those registry keys to the Registry Page in AI and they will be installed along with the DLL.

Of course, this is difficult to do if that DLL is coming from a third party and you don't know its registry keys...

Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
NickStuart
Posts: 8
Joined: Mon Jun 21, 2004 6:15 pm

Ok, so I am headed down the right track. A feature that would handy for this (as I stated earlier) is something like what is currently available with the "Add Values" option for the registery, but instead "Add Key" which would add the key and everything below it. But for now I guess I'll add it in by hand :?
Cata
Posts: 638
Joined: Thu Apr 10, 2003 7:37 am
Contact: Website

Yes, this feature is on our todo list. No time for it in 1.7 (which will have Features and Components), but maybe in 1.8.

Regards,
Cata
Catalin Rotaru - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”