My project uses several dll files with activex controls.
Now I am making a deployment project (windows installer).
I need to register dlls via windows installer using regsvr32. How should I do it ? And can I detect if regsvr32 failed or not ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I assume when you say you’re creating a deployment project, you’re talking about the nasty piece of work that’s available in Visual Studio?
If so, for each DLL, you can look at their properties, and set the “Register” property to COM.
If you’re using some other deployment technology (e.g. Wix, InstallShield, etc), then the answer will vary, but most of these have a simple setting to say “this is an COM dll that needs to be registered”, rather than you having to kick off regsvr32.
As to detecting failure – by using the built in facilities, the COM registration takes place during the normal install process, and failures cause the install to rollback – there’s no need to check this yourself; in much the same way that you don’t have to check that your files made it to the install location, and don’t have to worry that the disk was full.