Import file .reg on HKCU

Hello,

i’m trying to deploy Globalprotect and I’ve two portal. First is in MSI file and the second I would import via registry. I’ve tried a lot of solution but i haven’t found that valid.

How can i do this?

thanks a lot for your support

You do not mention which way you are doing this.

Depending on what you pick, you might be able to use this Import-RegFile function

Hello @That-Annoying-Guy and thank for your reply. I’ve tried with multiple solution:
1:

[scriptblock]$importReg = {
Execute-Process -Path ‘regedit’ -Parameters /q ${dirSupportFiles}\Myreg.reg
}
$goodProfiles = Get-Userprofiles -ExcludeNTAccount
Invoke-HKCURegistrySettingsForAllUsers -RegistrySettings $importReg -UserProfiles $goodProfiles

2:
Execute-processAsUser -path 'regedit.exe' -Parameters "/q ${dirSupportFiles}\Myreg.reg"

and other that i’ve found on site web

is it failing both with and without SCCM/Intune?

Hi, unfortunatelly i’ve only Intune, so i’ve tried with intune

When you say “I’ve two portal” do you mean 2x Win32apps in Intune, Or are you trying to import the REG file from inside the MSI and after the MSI is installed?

Have you tried Active Setup?

I have two vpn portals for two different companies. In the msi I entered, for example, vpn.mybusiness.com and in the .reg file vpn.mybysusiness2.com

Unfortunately, only one portal can be injected via msi and the second must be added via a .reg file.

I have not tried with “active setup” now I will try and let you know

Thank you.

1 Like