HKCU Reg Import

Hello there everyone, I am running into an issue and wanted to get some guideness on what my options are. I am deploying an application that is being “Installed For System” and “Only When A User Is Logged On”.
I am trying to import a reg file that needs to get imported into “HKEY_CURRENT_USER”

The normal process is not going to work for this kind of need as I have tested them and they do not work
"Execute-Process -FilePath “reg.exe” -Parameters “IMPORT "$dirFiles\CMSR18-Server.reg“” -PassThru”

Any help or guidness is greatly appreciated :slight_smile:

Set-RegistryKey would help …

Invoking reg.exe will need admin right ( that too depend how lock down your environment is )

you can also have a look at this for placing HKCU in all user without log off

Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $HKCURegistrySettings

(This is defined un AppDeployToolkitMain.ps1 ) …

1 Like