admin管理员组

文章数量:1346668

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.

本文标签: installscriptCannot create a key under HKEYLOCALMACHINE using Installshield 2015Stack Overflow