Re: Netlogon.bat script

From: Jerold Schulman (Jerry_at_jsiinc.com)
Date: 02/16/05


Date: Wed, 16 Feb 2005 07:18:24 -0500

On Tue, 15 Feb 2005 10:25:04 -0800, jessem <jessem@discussions.microsoft.com> wrote:

>Hello, I need help adding something to my netlogon.bat script but don't know
>if its possible or what I need.
>
>Basically, I'd like it so that when a user logs into the network, their
>username, ip address and/or computer name, time, and date are displayed on a
>text file for my viewing only. I don't know want the script to be shown
>while they're logging in. Currently, it doesn't show.
>
>Can I do this?

Almost.

Create a hidden share that everyone has change permissions on (Share and NTFS)
\\Servername\LogonInfo$

In your script, add:

for /f "Tokens=1* Delims=:" %%a in ('ipconfig /all^|Find "IP Address"') do set IP=%%b
set IP=%IP:~1%
@echo "%UserName%","%ComputerName%","%IP%","%LOGONSERVER%","%DATE%","%TIME%">"\\ServerName\LogonInfo$\%username%.log"

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com



Relevant Pages

  • Re: Weird script issues
    ... I also have the script as a logon script, so each time a user logs in it will ... I even get the error when a user logs in, so .UserName should not be ... It would fail at the line aUserName = Split ...
    (microsoft.public.scripting.vbscript)
  • Windows Authentication: username or computer name?
    ... Authentication use the Username that the user logs on with, ... the network name of the computer? ...
    (microsoft.public.sqlserver.msde)
  • network printing
    ... In another network I have it set up ... similarly so that when a user logs onto their computer they have access to ... access the win2k PC. ... I use the same username and password I use to ...
    (microsoft.public.win2000.networking)
  • Re: to add username & password into my login.cmd - login script
    ... echo You are now logged into %computername% ... echo Now setting up your computer for network access. ... The above is a logon script that we r using in our network. ... When we run this script it keeps asking for username & password. ...
    (microsoft.public.windows.server.scripting)
  • Re: to add username & password into my login.cmd - login script
    ... echo You are now logged into %computername% ... echo Now setting up your computer for network access. ... The above is a logon script that we r using in our network. ... When we run this script it keeps asking for username & password. ...
    (microsoft.public.windows.server.scripting)