Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I use regini to modify registry over the network? 1

Status
Not open for further replies.

confusedtekguy

IS-IT--Management
Jun 6, 2003
47
US
I'm trying to use the regini.exe tool, that comes with win2k server, to modify registry through the logon batch file. The problem I'm having is that I cant even get regini to run on the server... I tried to run a simple script that modifies the registry to not display last username that was loged on:

\registry\machine\software\microsoft\windows\currentversionpolicies\system
DontDisplayLastUserName = REG_DWORD 1

I made the script in text pad and saved it as test.ini, but when I try to run a command:

C:\winnt\system32\regini test.ini

It seems like it compiles, but when I go to the registry the changes arn't modified, what am I doing wrong?
 
If you do not have to accomplish this task through regini it can be accomplished using Group Policy
computer Configuration | Windows Settings | Security Settings | Local Policies | Security Options | Do not display last user name in logon screen

and also through VB Script
(no example handy)
 
to use in a logon script....

export the .reg file in question to a shared location either on you local pc or where ever you run your script from. in your batch file use this...

cmd /c %SystemRoot%\REGEDIT.EXE /S %computername%\%sharename%\DontDisplayLastUserName.reg

where %computername% is the name of the machine with the .reg file (if you leave it like that it will look to your local machine) and %sharename% is obviously the name of the share on that box.

this should copy that .reg file to the local pc.

 
Jbit1, your solution imports an entire registry everytime a user logs on, in my case this would be impractical. If I could just find a way to utilize regini, it would solve all my problems.
 
I dont know what you mean by an "entire" registry. Your simply doing a silent import using regedit.exe instead of regini. It does copy the other registry values within the system key but as long as those are set the way you want it doesn't matter. Did you try it???
I think you might be over complicating the issue by setting your heart on using regini.
 
Ok, I tried this script and saved as test.reg:

REGEDIT
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system\DontDisplayLastUserName = REG_SZ 1


It asked to confirm if I want to modify the registry, I said yes, it seemed to have modified it... but when I go into the registry the value isn't there.
 
Don’t know where you’re going wrong so I’ll give you the steps that I use (I will use the scenario as if you were running your scripts from the Netlogon directory on your domain controller)….

1. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\system. From here you can either modify the keys values and export or export them modify them using notepad. Export it using DontDisplayLastUserName as the name and save it to the Netlogon directory.

2. Either enter the script inside your login batch file or create a batch file and call it from your login batch file. Use the following…

@echo off
cmd /c%SystemRoot%\REGEDIT.EXE/S %logonserver%\netlogon\DontDisplayLastUserName.reg
Exit

That’s really all there is to it. Hope this works for you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top