Invoke-HKCURegistrySettingsForAllUsers suggestion

//Invoke-HKCURegistrySettingsForAllUsers suggestion
Invoke-HKCURegistrySettingsForAllUsers suggestion2016-05-05T18:39:10+00:00

The Toolkit Forums General Invoke-HKCURegistrySettingsForAllUsers suggestion

  • Author
    Posts
  • Jacob
    Participant
    Post count: 7

    Hey, all.

    I really like the “Invoke-HKCURegistrySettingsForAllUsers” cmdlet… but there’s one thing that would make it especially useful: the ability to use a reg file instead of having to input every key. I know this is at best wishy thinking, but with the ability to use a reg file, we could simplify the process for applications that depend on multiple HKCU settings.

    This cmdlet is really useful for applications which only depend on a small number of HKCU keys and values. There’s an example script on the forums where someone installs Adobe Reader with 400 “Set-RegistryKey” actions in the ScriptBlock. While I commend that person for taking on such a huge task, for now, with anything with more than 10-20 keys and values that need to go to all users, would use something like this as a last resort (as in, if the application fails to launch for missing keys instead of say showing a visible MSI heal window).

    I know this sits squarely in the “Suggestions” field, and I didn’t see any specific subforum for that so I’m posting it here (I also searched to make sure no one had posted it before). If this is an extremely noobish suggestion, forgive me.. I’m fairly new to PS scripting.

  • Pierrick
    Participant
    Post count: 15

    Hello Jacob,

    Managing the Current User context seems to be nothing but a real need ! =)

    Assuming your Current User is logged on, you can easily import a reg file with the following command line:
    Execute-ProcessAsUser -Path “reg.exe” -Parameters “import file.reg”

    Let me know the result !

You must be logged in to reply to this topic.