How did you define the categories? With code in a
[ComRegisterFunctionAttribute] class?

Signature
Phil Wilson [MVP Windows Installer]
----
> Is this a regasm bug or does anyone have an explanation to this behaviour?
>
[quoted text clipped - 11 lines]
>
> - regasm /regfile result (is missing the extra "implemented categories"):
[HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
>
> -regedit export done after a registration with regasm (contains the extra
> "Implemented Categories"):
[HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]
[HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}]
[HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}]
GT - 07 Oct 2004 06:37 GMT
Here is codes we use:
[ComRegisterFunction()]
public static void RegisterClass ( string key )
{
StringBuilder sb = new StringBuilder ( key ) ;
sb.Replace(@"HKEY_CLASSES_ROOT\","") ;
RegistryKey k = Registry.ClassesRoot.OpenSubKey(sb.ToString(),true);
RegistryKey implCats = k.CreateSubKey ( "Implemented Categories" ) ;
RegistryKey catId_SafeFoScripting =
implCats.CreateSubKey(CATID_SafeForScripting);
catId_SafeFoScripting.Close();
RegistryKey catId_SafeForInitializing =
implCats.CreateSubKey(CATID_SafeForInitializing);
catId_SafeForInitializing.Close();
implCats.Close ( ) ;
k.Close ( ) ;
}
> How did you define the categories? With code in a
> [ComRegisterFunctionAttribute] class?
[quoted text clipped - 29 lines]
> [HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> > Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}]
Luis Abreu - 07 Oct 2004 09:07 GMT
Shouldn't it be:
public static void RegisterClass ( Type t )
instead of
public static void RegisterClass ( string key )

Signature
--
Regards,
Luis Abreu
http://weblogs.pontonetpt.com/luisabreu
http://www.pontonetpt.com
> Here is codes we use:
>
[quoted text clipped - 39 lines]
> > >
> > > - regasm /regfile result (is missing the extra "implemented categories"):
[HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> > > Categories\{62C8FE65-4EBB-45E7-B440-6E39B2CDBF29}]
> > >
> > > -regedit export done after a registration with regasm (contains the extra
> > > "Implemented Categories"):
[HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> > > Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}]
[HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> > > Categories\{7DD95801-9882-11CF-9FA9-00AA006C42C4}]
[HKEY_CLASSES_ROOT\CLSID\{40928702-791B-40C5-B8B4-CDF84C3C8650}\Implemented
> > > Categories\{7DD95802-9882-11CF-9FA9-00AA006C42C4}]
> Is this a regasm bug or does anyone have an explanation to this behaviour?
/regfile is an "informal" option. It generates hard-coded
paths and omits RegisterClass calls. Don't use it for
real, just debugging.
bye
Rob
GT - 07 Oct 2004 16:33 GMT
My problem is that I cant find any support in the MSI SDK for creating the
necessary information in the MSM registry table. My idea of a workaroud then
was to use regasm /Regfile to create the necessary data and then I would use
it to populate the MSM registry table. Do you know a better way?
Thanks,
GT
> > Is this a regasm bug or does anyone have an explanation to this behaviour?
>
[quoted text clipped - 4 lines]
> bye
> Rob
Robert Jordan - 07 Oct 2004 16:55 GMT
Hi,
> My problem is that I cant find any support in the MSI SDK for creating the
> necessary information in the MSM registry table. My idea of a workaroud then
> was to use regasm /Regfile to create the necessary data and then I would use
> it to populate the MSM registry table. Do you know a better way?
Even my old InstallShield Express 4.x supports the option
"Register for COM interop", so I did't had to deal with
this problem.
You may try to execute regasm from a Custom Action.
bye
Rob
> Thanks,
> GT
[quoted text clipped - 7 lines]
>>bye
>>Rob
GT - 08 Oct 2004 06:05 GMT
Are you sure that Installshield 4 express really covers the extra implemented
categories that you may add to your code? Since the installer SDK does not
cover this it seems to mee that they will have the same problem.
We are using a custom action right now but I really thougt that msi would
offer a more elegant way to do this. It's mainstream (in the mixed com and
.net products) and for such things you should not need to develop and call
custom actions?!
Thanks,
GT
> Hi,
>
[quoted text clipped - 23 lines]
> >>bye
> >>Rob
Phil Wilson - 07 Oct 2004 19:15 GMT
It might work if you go to the properties of the assembly (select it, then
F4) and then set the Register property to vsdrsaCOM (maybe vsdrpCOM if
you're using Primary Output). VS runs regasm at build time to extract the
data, but I have a feeling it uses the /regfile option internally, and if so
you won't see your custom entries. If that's the case, you could just add
them in the Registry view of the IDE (and set AlwaysCreate for them) instead
of using your ComRegisterFunctionAttribute code.

Signature
Phil Wilson
[MVP Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280
> My problem is that I cant find any support in the MSI SDK for creating the
> necessary information in the MSM registry table. My idea of a workaroud
[quoted text clipped - 15 lines]
>> bye
>> Rob
GT - 08 Oct 2004 07:05 GMT
We have tried to use both VsdraCOM and VsDraCOMRelativePath (I cannot find
exactly the properies that you mention, maybe because we are using another VS
version than you?, VS2003) but it does not add the extra Implemented
Categories so your feeling was right.
Thanks,
Gunnar
> It might work if you go to the properties of the assembly (select it, then
> F4) and then set the Register property to vsdrsaCOM (maybe vsdrpCOM if
[quoted text clipped - 22 lines]
> >> bye
> >> Rob