Import a registry in Software Distribution

I need to run a command to import a registry in Software Distribution.

What command can I use to import a registry ?

I’m using, regedit / s “C: \ nameregistry.reg” or regedit / s “nameregistry.reg” but is not working.

Does the problem is related to call regedit?

Thank you.

You can run any windows command from within action script by using the following syntax. It will be run as SYSTEM.

waithidden cmd.exe /C “your command that works when run from a command prompt”

That being said, you have some extra spaces in your command regedit / s “C: \ nameregistry.reg” that might be a problem. Did you include your .reg file in your software distribution package (eg. you used the Software Distribution wizard)?

How many registry entries are being set by the .reg file?

Personally, I prefer to use the regset64 actionscript command.

I am using, Managing Software Distribution.

I am using the command this way, waithidden cmd.exe /C “regedit /s nameregistry.reg” or waithidden cmd.exe /C “regedit /s C:\nameregistry.reg”, It is not working.

They are being set folders 3 entries.

How can I use the “regset64 actionscript command”?

Remembering that I pass this command in Create Task distribution in> Software Distribution> Select Package> Manage Task> New Task, add the nameregistry.reg file, and Installation Command field I put this way,

waithidden cmd.exe /C “regedit /s nameregistry.reg”

or this otherwise

waithidden cmd.exe /C “regedit /s C:\nameregistry.reg”

this second command I previously put the nameregistry file in C: \

can you provide the contents of the nameregistry.reg file? You can replace any sensitive info with fake data if needed.

I see multiple issues with what you are doing, but I’d like to know the contents of the reg file if possible before addressing it.

Hi there , im trying to do the same but with proxy exclusions.

this will be for work-group machines

What does the exported registry key look like?

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
“NoNetAutodial”=dword:00000000
"MigrateProxy"=dword:00000001
"ProxyEnable"=dword:00000001
"ProxyHttp1.1"=dword:00000000
"EnableAutodial"=dword:00000000
"ProxyServer"=“IP address will go here”
“ProxyOverride”=“localhost;”

I believe the issue is that this will be run as SYSTEM but you’re trying to add settings to HKCU

BigFix typically runs in a system context, but there is a way to make changes to HKCU for the current user. Example:

regset “[HKEY_USERS{component string of sid of security account (name of logged on user)}\Software\Microsoft\Windows\CurrentVersion\Internet Settings]” “NoNetAutodial”=dword:00000000