Solved

Run .reg file with login via AD

Posted on 2014-11-27
8
205 Views
Last Modified: 2014-12-26
I need to push af .reg import file to user i AD. I need to do it like a login.bat file.

How to do?
0
Comment
Question by:AC
  • 3
  • 2
8 Comments
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 40468575
One option is to do that with registry preference items using the Group Policy Management Console:
Registry Extension
http://technet.microsoft.com/en-us/library/cc771589.aspx

If you want to do it with a .reg file after all, you can use the command line tool "reg.exe" to import the reg file.
Save the reg file in the netlogon folder, and use this line in your batch:
reg.exe import "%logonserver%\netlogon\TheRegistryFile.reg

Open in new window

0
 

Author Comment

by:AC
ID: 40468591
ok thanks... so i need to put the file i wish to import i the netlogon folder?
0
 
LVL 83

Expert Comment

by:oBdA
ID: 40468775
Not necessarily, it could be anywhere where your users have access to it, but since you're planning to run it as part of a logon script, the netlogon folder is a logical choice.
Just noticed that in the the command above, the closing double quote went AWOL; it should of course have been
reg.exe import "%logonserver%\netlogon\TheRegistryFile.reg"

Open in new window

0
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Author Comment

by:AC
ID: 40468875
This is only merge right? it is not overwrithing the hole file?
0
 
LVL 83

Expert Comment

by:oBdA
ID: 40468919
What do you mean with "this is only merge"? The "reg.exe import ..." command has the exact same result as double-clicking the reg file and clicking "yes" on regedit's dialog box, or starting regedit.exe and using the "File > Import..." function.
0
 
LVL 54

Expert Comment

by:McKnife
ID: 40469715
Yes, it's just a merge. Be aware that logon scripts run in the users' security context, they will not be able to change anything below the HKLM hive, for example.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A safe way to clean winsxs folder from your windows server 2008 R2 editions
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question