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.
精彩评论