Registry edit script to run with system account and edit current user registry hive

Nadimuddin J Shaikh 1 Reputation point
2022-06-24T14:39:15.2+00:00

I am unable to figure out how should I resolve the below

I have a requirement to set a registry key value for the HKCUrrentUser
I need to do this via Intune
I tried running this through the Scripts feature in Intune, but when I configure the script to run with logged-in user credential it does not create the registry key at all - maybe because user does not have permission to edit the registry

And when I configure the Script to run with system account it does create the registry as it does not know the HKCUrrent User registry hive

Am I doing something wrong in the configuration
Need your expert advise on this
Many thanks in advance guys

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,641 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,378 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Rudy Ooms 596 Reputation points
    2022-06-27T12:15:24.153+00:00

    Hi... Maybe do the same as I did in part 4

    https://call4cloud.nl/2022/06/the-adventures-of-the-broken-store-apps-across-the-8th-s-1-15-2-1/#part4

    I needed to change some permissions on a hkcu key

    0 comments No comments

  2. Rahul Jindal [MVP] 9,146 Reputation points MVP
    2022-06-27T20:19:38.383+00:00

    Logged in user should have permissions to HKCU hive, but some areas may need elevated permissions. May I know which key are you trying to create?

    0 comments No comments