Adding an regsvr32 commandline in a setup project

G

Guest

Hi,

I have a VB.Net Setup and deployment project that installs my application.
Now in my application, I am using an ocx that I have explicitly registered
using the regsvr32.exe utility. Now when I deploy my application on another
computer that does not have this registered, it gives an unhandled exception
(which is expected). How can i add this script in my setup project itself?

Any pointers are gladly appreciated
 
P

Phil Wilson

If you just add the OCX into the File System on Target Machine view in the
setup project you'll see its register property gets set to vsdrfCOMSelfReg
(select the file, hit F4), which does the same thing as regsvr32. If the OCX
might be installed by other setups, make sure you all install it to the same
location.
 
G

Guest

Gee thanks Phil!

I had that ocx included in my project alright but the Register property was
set to vsdrfCOMDoNotRegister. I made the change and it works pretty fine now.
But just a quick question: Would this ocx get unregistered at the time of
uninstallation? I tried it and it does get removed from the Registry's HKCR.
But just wanted a clarification on this.
Moreover, does the presence of a COM component in the registry also get
affected by the location of the component on the machine? For a little more
context, I had initially registered the component from the program files
directory. However, when I changed the application folder to c:\ the entire
application had crashed leading to an unhandled exception. It baffles me on
the front that how does it matter where the component was registered from! As
long as there is a valid entry in the registry, it should not matter where
you load your application. Can u shed some light on this?

Nick

Phil Wilson said:
If you just add the OCX into the File System on Target Machine view in the
setup project you'll see its register property gets set to vsdrfCOMSelfReg
(select the file, hit F4), which does the same thing as regsvr32. If the OCX
might be installed by other setups, make sure you all install it to the same
location.
--
Phil Wilson [MVP Windows Installer]
----
Nick said:
Hi,

I have a VB.Net Setup and deployment project that installs my application.
Now in my application, I am using an ocx that I have explicitly registered
using the regsvr32.exe utility. Now when I deploy my application on
another
computer that does not have this registered, it gives an unhandled
exception
(which is expected). How can i add this script in my setup project itself?

Any pointers are gladly appreciated
 

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