开发者

Pass parameters for ocx registration during installation in VS setup project

开发者 https://www.devze.com 2023-03-11 16:14 出处:网络
I have an OCX that requires licensing in order for it to work. The vendor tells me to register it this way:

I have an OCX that requires licensing in order for it to work. The vendor tells me to register it this way:

regsvr32.exe "widget.ocx" "/i:licensekey" /s

I am using Visual Studio 2008 Setup Project where the OCX is detected as a dependency. I have the Register property set to "vsdrfCOMSelfReg". However, I don't see a way of passing the /s and /i parameters. This causes the OCX registration process to display a registration di开发者_如何学运维alog to the user, which I don't want.

Any idea how I can pass the license key during OCX installation in VS Setup Project?


Since the file is registered in a special way, "vsdrfCOMSelfReg" won't work. Instead, you can try using a custom action which runs the registration command.

Basically, you can write custom code which launches regsvr32.exe with the appropriate command line. For example, you can use ShellExecute.

0

精彩评论

暂无评论...
验证码 换一张
取 消