How to have .msi run regsvr32 after installation?

G

Guest

Hi, I'm using vs2005, .net2 for windows application. I would like to run a
command after my windows applciation is installed to install some property
pages in the registry. Currently I mannually run it in Dos Command:
"regsvr32 xxxx.dll". How can I add this ability in my application
installation file so it will run automatically as part of my application
installation in my .msi file? Thanks.
 
N

Nicholas Paldino [.NET/C# MVP]

Pucca,

If you add your COM component to your setup project, it should have an
option to auto register (as opposed to you specifying the registry settings
yourself). This will do the same thing as calling regsvr32 on the COM dll
yourself.

If you are using .NET though, and the component is written using .NET
for use through COM interop, then you don't want to use regsvr32. However,
I can see if you need to do this because you are using an unmanaged COM
component in your .NET app.
 
G

Guest

Hi Nicholas,
The COM that I want to register is a unmanaged COM. Even though my
application doesn't directly uses it, I still need to register it. The COM
component contains 3 extended propertysheet page that I created for Active
Directory's property page. I just need to register it during my C#
application installatino. How would you recommend in getting this done? I
saw "PostBuildEvent property" in the Setup project property. I'm trying to
find documentation on how to use this but not much luck so far. Do I just
type in the pop up window for this property my command like "regsvr32
xxxx.dll"? Thanks.
--
Thanks.


Nicholas Paldino said:
Pucca,

If you add your COM component to your setup project, it should have an
option to auto register (as opposed to you specifying the registry settings
yourself). This will do the same thing as calling regsvr32 on the COM dll
yourself.

If you are using .NET though, and the component is written using .NET
for use through COM interop, then you don't want to use regsvr32. However,
I can see if you need to do this because you are using an unmanaged COM
component in your .NET app.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Pucca said:
Hi, I'm using vs2005, .net2 for windows application. I would like to run
a
command after my windows applciation is installed to install some property
pages in the registry. Currently I mannually run it in Dos Command:
"regsvr32 xxxx.dll". How can I add this ability in my application
installation file so it will run automatically as part of my application
installation in my .msi file? Thanks.
 
G

Guest

Forget about "PostBuildEvent". I just realize that is about "Build events".
It' not related to Post installation that I need to fire the regsvr32
command.
--
Thanks.


Pucca said:
Hi Nicholas,
The COM that I want to register is a unmanaged COM. Even though my
application doesn't directly uses it, I still need to register it. The COM
component contains 3 extended propertysheet page that I created for Active
Directory's property page. I just need to register it during my C#
application installatino. How would you recommend in getting this done? I
saw "PostBuildEvent property" in the Setup project property. I'm trying to
find documentation on how to use this but not much luck so far. Do I just
type in the pop up window for this property my command like "regsvr32
xxxx.dll"? Thanks.
--
Thanks.


Nicholas Paldino said:
Pucca,

If you add your COM component to your setup project, it should have an
option to auto register (as opposed to you specifying the registry settings
yourself). This will do the same thing as calling regsvr32 on the COM dll
yourself.

If you are using .NET though, and the component is written using .NET
for use through COM interop, then you don't want to use regsvr32. However,
I can see if you need to do this because you are using an unmanaged COM
component in your .NET app.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Pucca said:
Hi, I'm using vs2005, .net2 for windows application. I would like to run
a
command after my windows applciation is installed to install some property
pages in the registry. Currently I mannually run it in Dos Command:
"regsvr32 xxxx.dll". How can I add this ability in my application
installation file so it will run automatically as part of my application
installation in my .msi file? Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top