PDA

View Full Version : registry a .ocx file with regsvr32.exe



aranda
02-11-2005, 05:18 PM
I have a problem... I need to registry a .ocx file with regsvr32.exe and in my project I select yes in the Self-Register properties in the objects view... but when i run my installer i have to registry the .ocx file manually... is any way to make it with my installer, i don't want to do it manually.

RadhaK
02-15-2005, 06:39 AM
Hi,

It is possible create a registry using installscript, use the below example to create registry

RegDBSetDefaultRoot ( nRootKey );

(nRootKey Specify one of the following constants for the root key:

HKEY_CLASSES_ROOT
HKEY_CURRENT_USER
HKEY_LOCAL_MACHINE
HKEY_USERS
HKEY_CURRENT_CONFIG
HKEY_DYN_DATA
HKEY_USER_SELECTABLE )


szKey = "ShareWare\\Games\\CoolChess";
szClass = "LastPlayed";'

RegDBCreateKeyEx(szKey, szClass);

vikasv
02-15-2005, 07:01 AM
Do not use regsvr32 to register as you may have to do the reverse while uninstalling the application. You need to use InstallShields component wizard (launch it by right clicking on a feature) Here you can specify whether it is a com dll. InstallShield will extract all the required info for registering the file and will do a self register for the file. It is the recommended way of registering a file

Hope this helps.
Vikas