Seite 1 von 1

Importing .reg-files

Verfasst: 11 Feb 2013, 15:09
von bobzbobz

I am trying to create a script, which imports A LOT of registry-keys - is it possible to import them from a .reg-file instead of creating a [Registry_Install]-section?

(The problem is that it should be for all users in HKCU)

Best Regards,

Re: Importing .reg-files

Verfasst: 11 Feb 2013, 16:56
von SisterOfMercy
If you need to install registry keys to all users, call the [registry_install] section with /AllNTUserDats, like this:

Code: Alles auswählen

if ($INST_SystemType$ = "64 Bit System") and (($INST_architecture$ = "system specific") or ($INST_architecture$ = "both") or ($INST_architecture$ = "64 only"))
   Message "Installing " + $ProductId$ + " 64 Bit..."
   comment "Start setup program"
   comment "Copy files"
   Files_install /AllNTUserProfiles
   comment "Patch Registry"
   Registry_install /AllNTUserDats

And of course you can also import a .reg file, just call regedit silently with the .reg file to import. Look here:

Personally I prefer to keep changes in one place, and that is in the OPSI script.

Re: Importing .reg-files

Verfasst: 22 Feb 2013, 21:07
von d.oertel

Re: Importing .reg-files

Verfasst: 04 Mär 2013, 08:28
von bobzbobz
Thanks :)


Re: Importing .reg-files

Verfasst: 02 Nov 2020, 13:40
von crawleroz1
I had the same problem the following was the solution:

registry "%scriptpath%\Data\reg\my.reg" /regedit /AllNTUserDats