PDA

View Full Version : Windows 2k login scripts


ReddDogg
03-01-2001, 01:58 PM
Well, I am in a bit of a bind. I am so good with windows NT, but windows 2000 is a bit different, and here in my new job, well, we don't use windows NT anymore. http://www.PCGuide.com/ubb/frown.gif

My problem is we need to make a logon script that executes a .reg file for all users when they logon that makes some adjustments to the registry. I have the .reg file ready, but I am not certain how to make the reg file actually run. I can't seem to make it execute from inside a .bat file, and I am not sure what folder in 2k to put it in to make it accessable as a login script. In windows NT it was winnt/system32/repl/import/scripts, but this folder doesn't exist on the 2k server, and even when I manually create it and share it, I can't access the .reg file as the logon script, or else I am not allowed to just run that one file. It is quite annoying. I am trying to avoid having to use pc anywhere to connect to each computer, one at a time, and running hte update.

Any help will be appreciated. Thankx

------------------
Joe Redd
MCP

ReddDogg
03-06-2001, 05:42 PM
For anyone who might like to know, I found out that this Windows 2000 server is using Active Directory, rather than PDC emulation, which is why it looks different than NT in the file structure. So, I was looking in the wrong place for a folder that houses the login scripts. Regardless, I haven't figured out how to execute that .reg file in a login script. I am still looking for help. Any ya can offer would be appreciated.

------------------
Joe Redd
MCP

Ghost_Hacker
03-06-2001, 06:18 PM
The Netlogon share on a Domain controller in Windows 2000 is located in:

%systemroot\SYSVOL\sysvol\domainname\scripts


Also have you tried this command:

regedit <path to file>\filename.reg -s
(IE: regedit c:\newregister\update.reg -s)

in a batch file? (the -s option runs it in silent mode.)

Hope this helps http://www.PCGuide.com/ubb/smile.gif

------------------
"It's just a whisper in my Ghost"



[This message has been edited by Ghost_Hacker (edited 03-06-2001).]

ReddDogg
03-14-2001, 10:44 AM
Thanks Ghost for the helpful info. You were right about the place where scripts are housed, and your tip for the logon script was good too. However, the -s switch doesn't work for me, it instead wants to add -s to the registry. /s, and \s don't work either. If you might know of a better switch to try, that would be great. I will do some looking myself and will tell ya if I find anything.



------------------
Joe Redd
MCP

Ghost_Hacker
03-14-2001, 05:27 PM
ReddDogg,

After looking around I found an "I" switch which imports reg keys and a "C" switch which stands for "complete register".

The examples had them placed in front of the reg file like this:


regedit /i newkey.reg

regedit /c newreg.reg


I couldn't find the "S" switch listed anywhere else, but where I found that first example.

------------------
"It's just a whisper in my Ghost"

ReddDogg
03-16-2001, 11:28 AM
Well, further research on my part shows the -s switch is a valid one, but only when used before the file pathname. The other switches are nice, but the -s does accomplish the no choice on whether the .reg file gets installed, which is what works best for us. Thanks alot Ghost, you are certainly "All That and a Bag of Cool Ranch Doritos" http://www.PCGuide.com/ubb/smile.gif

------------------
Joe Redd
MCP