最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

installscript - Cannot create a key under HKEY_LOCAL_MACHINE. using Installshield 2015 - Stack Overflow

programmeradmin0浏览0评论

Installerc created using Installshield 2015 is not able to create a registry key under HKEY_LOCAL_MACHINE hive. The script is given below. I verified that installer is running with admin priviliges.

function RegisterPlugin(hWnd)

STRING szKey, szClass;

begin

 

if (RegDBSetDefaultRoot (HKEY_LOCAL_MACHINE) < 0) then

 

    MessageBox ("First call to RegDBSetDefaultRoot failed.", SEVERE);

 

  else

 

    MessageBox ("Root key successfully set to HKEY_LOCAL_MACHINE.", INFORMATION);

 

  endif;


szKey   = "SOFTWARE\\Autodesk\\AutoCAD\\R25.0\\ACAD-8101:409\\Applications\\MyPlugin";


 

  szClass  = "";

   

   

  

 

  REGDB_OPTIONS = REGDB_OPTION_WOW64_64KEY;

 

 

 

if (RegDBCreateKeyEx(szKey, szClass) < 0) then

 

    MessageBox ("First call to RegDBCreateKeyEx failed.", SEVERE);

 

    abort;

 

  else

 

    SprintfBox (INFORMATION, "Youo", "Successfully created: %s", szKey);

 

endif; 

 

end;

Please help.

发布评论

评论列表(0)

  1. 暂无评论