Managed install to add a registry key to HKCU added it to HKU\.Default instead
Hello! I would like to use a KACE managed install to add two registry keys to HKEY_CURRENT_USERS and push it out to multiple users at my firm. However, when I ran the managed install on a test machine and looked for the keys in the registry, they weren't in the HKCU. Instead they were in HKEY_USERS\.DEFAULT. Is there a way I can get them to go to HKCU instead? Perhaps I'm missing something?
I created two separate .reg files (key one and key two). Then I created an install.bat file to add the two keys and zipped everything into one zip file which I uploaded to KACE. Codes are below.
Install.bat
regedit /s "UsePrinterDCForMetafile.reg"
regedit /s "QFE_Boston.reg"
Key one:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Excel\Options\]
"QFE_Boston"=dword:00000001
**Key installed to HKEY_USERS\.DEFAULT\Software\Microsoft\Office\15.0\Excel\Options\ instead**
Key two:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Common]
"UsePrinterDCForMetafile"=dword:00000001
**Key installed to HKEY_USERS\.DEFAULT\Software\Microsoft\Office\15.0\Common instead**
UPDATE (3/20/2017):
Just thought I should note that when I run the install.bat file locally (not through KACE), the registry keys get created in HKCU...Not sure what's happening during the KACE managed install process where it gets switched to HKU\.DEFAULT.
I tried alphabeta's suggestion of changing my .reg files to add to HKLM instead, but that didn't work. The registry keys still got created in the HKU\.DEFAULT locations.
UPDATE (3/22/2017):
I appreciate all the replies thus far! :)
I've been doing more research on the side and I think the reason why it saves to HKU\.DEFAULT is because managed installs run everything as the Local System Account (rather than current user). I erroneously thought it was running as an admin account this whole time.
It seems like there's no way to change it to run as a current user (https://support.quest.com/kace-systems-management-appliance/kb/111280). Therefore, I've been looking into scripting and set up two online K-scripts, which installs the registry keys to the places I want. I've got a bit more tweaking to do before I'll be satisfied with the scripts. I'll update when I'm done (hopefully in the next day).
UPDATE (3/23/2017):
See answer below.
-
Try one last place for me please. Try using HKLM\Software\WOW6432Node\Microsoft\Office\15.0, after that I'm lost as to what to do. Maybe someone else has an idea? - alphabeta 7 years ago
-
They actually installed to there! However, the problem I was trying to fix with those reg entries still exists so I think they have to be actually installed to HKCU. Thanks for the suggestions, though!! - ithelpdeskacc 7 years ago
-
What server version are you on? What version(s) of the agent are you using? - JasonEgg 7 years ago
-
Server is 6.2.109330 and agent is 6.2.1025, so pretty old. - ithelpdeskacc 7 years ago
Answers (4)
Comments:
-
Thanks for the reply! I'm not sure what you mean though. I ran my KACE managed install while I was logged in with my account on the test computer. - ithelpdeskacc 7 years ago
Comments:
-
I'll give that a try and let you know. Thank you! - ithelpdeskacc 7 years ago
-
Darn. They got put it in the HKU\.DEFAULT locations again. - ithelpdeskacc 7 years ago
-
I'm stating the obvious but I'm sure you're aware that If you run the batch file locally it'll run as intended as you're logged in and the HKCU is 'active' and not during startup. Just as a side thought, are you using Windows 32 bit or 64 bit? - alphabeta 7 years ago
-
Yeah, after I typed my update I realized that. I'm using Windows 7 64-bit. - ithelpdeskacc 7 years ago
Top Answer
I will be using scripting to push out my registry edits rather than managed installs:
On the admin console I went to Scripting -> Configuration policies -> Registry -> I copied the code for my first key into the Registry File field and clicked Save.
I then changed the settings in the script details to have the script run as the Local System and disabled the alerts so that the script will run silently. Then I repeated process for my second key.
I have successfully run my scripts on my test machines. Now, I just need to figure out a way to see what machines have it installed...I created software entries for each key; however, they don't reflect the machines that have it installed. But that's a different question for a different thread.
Comments:
-
Oh, I see. Do you know how I would go about writing a script to do what I want or where I could look to get started? I'm not very familiar with scripting yet. - ithelpdeskacc 7 years ago