Importing .reg-files

Antworten
bobzbobz
Beiträge: 169
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Importing .reg-files

Beitrag von bobzbobz »

Hi

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,
Soren
Benutzeravatar
SisterOfMercy
Beiträge: 1522
Registriert: 22 Jun 2012, 19:18

Re: Importing .reg-files

Beitrag 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"
	Winbatch_install_64
	Sub_check_exitcode
	comment "Copy files"
	Files_install /AllNTUserProfiles
	Files_install_64
	comment "Patch Registry"
	Registry_install /AllNTUserDats
endif
And of course you can also import a .reg file, just call regedit silently with the .reg file to import. Look here: http://ss64.com/nt/regedit.html

Personally I prefer to keep changes in one place, and that is in the OPSI script.
Bitte schreiben Sie Deutsch, when I'm responding in the German-speaking part of the forum!
Benutzeravatar
d.oertel
uib-Team
Beiträge: 3319
Registriert: 04 Jun 2008, 14:27

Re: Importing .reg-files

Beitrag von d.oertel »

Hi,

you may also use the opsi-winst to import .reg files.

http://download.uib.de/opsi_stable/doc/ ... ry-regedit

regards

d.oertel
opsi support - uib gmbh

For productive opsi installations we recommend support contracts.
http://www.uib.de
http://www.opsi.org
bobzbobz
Beiträge: 169
Registriert: 30 Nov 2012, 10:41
Wohnort: Denmark

Re: Importing .reg-files

Beitrag von bobzbobz »

Thanks :)

Regards,
Soren
crawleroz1
Beiträge: 49
Registriert: 13 Mär 2018, 11:36

Re: Importing .reg-files

Beitrag von crawleroz1 »

I had the same problem the following was the solution:

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

:!:
Antworten