hagrawal
Posts: 5
Joined: Mon Jul 13, 2020 12:59 pm

I want to create one registry key for all users in HKLM...

Hi there,

I want to create one registry key for all users in HKLM, but even if I specified that in the HKLM in "Registry" page, it is not getting created even though I install the installer on a machine having admin rights.
How can I achieve this using custom action if this is not possible?

Please suggest.

Thanks,
Hetal
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: I want to create one registry key for all users in HKLM...

Hi Hetal,

Please take a look on the "Win 8 Registry Key Written to Wrong Location" thread which debates a similar problem and see if it helps. If not, please send us your project and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hagrawal
Posts: 5
Joined: Mon Jul 13, 2020 12:59 pm

Re: I want to create one registry key for all users in HKLM...

Hi Eusebiu,

Thank you so much for your reply. I have gone through the link you suggested. But, please note that we are supporting 64-bit only.

We have attached the log for your reference.
Even I tried it to do by vbscript and adding a "DoAction" of "Finish" Dialog, but even by doing so, it is not working.

Function CreateHKLMKeyFomHKCU(source)
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")

objReg.CreateKey HKEY_LOCAL_MACHINE, sourc
objReg.SetStringValue HKEY_LOCAL_MACHINE, source, "Description" , "AsiteWordAddIn"
objReg.SetStringValue HKEY_LOCAL_MACHINE, source, "FriendlyName" , "AsiteWordAddIn"
objReg.SetDWORDValue HKEY_LOCAL_MACHINE, source, "LoadBehavior", 3
objReg.SetStringValue HKEY_LOCAL_MACHINE, source, "Manifest", "C:\Program Files\Adoddle Navigator\WordAddIn2.vsto|vstolocal"
End Function

Let me know if you need more information. Also, please note that Doing via VB script, works for some time and it does not work some time.

Could you please suggest?

Thanks,
Hetal
Attachments
InstallerVerbose_OnlyHavingHKLMRegistryOnly.zip
(126.01 KiB) Downloaded 237 times
InstallerVerbose.log
(81.86 KiB) Downloaded 237 times
Last edited by hagrawal on Thu Jul 16, 2020 11:36 am, edited 1 time in total.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: I want to create one registry key for all users in HKLM...

Hi Hetal,

The log file shows that the installation fails at the beginning because an incorrect path is set for the application folder in the "Install Parameters" page of your project. The path is "Asite\Adoddle Navigator QA", but it should be something like "C:\Asite\Adoddle Navigator QA" in order to work.

Please change that and send me a new verbose log of the installation along with the names of some registry entries that are not installed.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hagrawal
Posts: 5
Joined: Mon Jul 13, 2020 12:59 pm

Re: I want to create one registry key for all users in HKLM...

Hi Eusebiu,

Thanks a lot for your reply, I corrected the APPDIR path, and rerun the installer and attached the log.
Also, I added Registry values in HKLM as we need to install plug-in for all users, but it is not getting installed in HKLM.

In addition, if I tried it using vbs but it no success, if I do it using C# custom action, will it make difference?

Please note that our application itself is getting installed for all users using Advanced Installer, but office plug-ins are not getting installed for all users.

Please suggest.

Thanks,
Hetal
Attachments
InstallerVerbose.zip
(125.78 KiB) Downloaded 237 times
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: I want to create one registry key for all users in HKLM...

Hi Hetal,

The verbose log shows a lot of registry entries that were installed on the machine (many of them related to Office Add-Ins). You can see this starting with the 7792 line from the log.

Can you send me to support at advancedinstaller dot com a sample package that reproduces the problem, so I can test it on my side and investigate the problem?

Best regards
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
hagrawal
Posts: 5
Joined: Mon Jul 13, 2020 12:59 pm

Re: I want to create one registry key for all users in HKLM...

Hi Eusebiu,

I tried C# custom action and making registry entries using it and I tested it 2-3 times it does creates entries at proper location in HKLM. But, this entries are not getting cleaned when we uninstall, so I created one different Custom Action in the same C# dll, and created a new custom Action with the different function and selected uninstall, but I am getting error that "There is a problem with the windows installer, the required dll is not found, please contact your administrator.

Though I am using the same dll. Also, please note that when I created first custom action it named like "HKLMCustomAction.CA.dll" and when I created second one it named like HKLMCustomAction.CA.dll_1

So, I am stuck with this error message, I can not uninstall so can not install new. Is there any way around?

Please suggest.

Thanks,
Hetal
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: I want to create one registry key for all users in HKLM...

Hi Hetal,

This may happen if you try to execute the uninstall custom action after its related DLL file was already removed from the machine. To make sure that the DLL is present on the machine, you need to place the custom action above the "Remove Resources" action group. Can you try this and see if this work? If not, please send me your project and a verbose log of the uninstall, so I can investigate them.

In order to remove the broken version, you can use on of the methods described in the "How do I remove a broken installation" FAQ.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”