比如,有一个dll文件 a.dll
用户在选择安装目录时,选择了 c:\Program Files
这个dll需要注册,
我应该在注册表的某个位置,写上 c:\program files\a.dll该怎么办?其中,C;\program files可以换成用户选择的任意目录,还可以创建,是个变化的值。
用户在选择安装目录时,选择了 c:\Program Files
这个dll需要注册,
我应该在注册表的某个位置,写上 c:\program files\a.dll该怎么办?其中,C;\program files可以换成用户选择的任意目录,还可以创建,是个变化的值。
我明明放进Files Groups的Program Dlls中去了啊。
要注册dll而且,还有一段license说明,怎么改成我自己的?(今天刚开始用InstallShield)
NUMBER nResult;
STRING szKey;
STRING szClass;
STRING szPath;
STRING szTitle; begin // TODO : Add all your registry entry keys here
//
//
// RegDBCreateKeyEx, RegDBSetKeyValueEx....
// //nResult = CreateRegistrySet( "" ); szKey = "HKEY_LOCAL_MACHINE\\SOFTWARE\\StockDrv";
szClass = "Driver";
szPath = svDir+"\\stockio.dll";
szTitle = "RegDBCreateKeyEx & RegDBSetKeyValueEx"; //Add a Key of Driver
nResult = RegDBCreateKeyEx(szKey,szClass);
if (nResult<0) then
MessageBox("RegDBCreateKeyEx failed.", SEVERE);
//abort;
else
SprintfBox(INFORMATION, szTitle, "Successfully created: %s", szKey);
endif; //Set the install path to Driver
nResult = RegDBSetKeyValueEx (szKey, szClass, REGDB_STRING, szPath, -1); if (nResult<0) then
MessageBox("RegDBSetKeyValueEx failed.", SEVERE);
//abort;
endif; return nResult;
end;
得先改变主键。NUMBER nRootKey; nRootKey = HKEY_LOCAL_MACHINE;
if (RegDBSetDefaultRoot(nRootKey) < 0) then
// MessageBox("First call to RegDBSetDefaultRoot failed.", SEVERE);
else
// MessageBox("Root key successfully set to HKEY_LOCAL_MACHINE.", INFORMATION);
endif;