A one-time logon script?

J

Jon

Is there a way to have a login script run only the first time a user logs
into the domain? If so, where can I find info on doing that? I've seen
plenty of stuff for scripts, but nothing about making them happen only once.

Thanks
Jon
 
P

Pegasus \(MVP\)

Jon said:
Is there a way to have a login script run only the first time a user logs
into the domain? If so, where can I find info on doing that? I've seen
plenty of stuff for scripts, but nothing about making them happen only once.

Thanks
Jon

You can do this as a little exercise in logical thinking, e.g. like so:

Line1 @echo off
Line2 if exist \\YourServer\Logs\Semaphores\%UserName%.log goto :eof
Line3 if not exist \\YourServer\Logs\Semaphores md
\\YourServer\Logs\Semaphores
Line4 echo %date% %time%: %UserName% used PC %ComputerName% to log on. >
\\YourServer\Logs\Semaphores\%UserName%.log

Now make sure that the share \\YourServer\Logs exists, and that
everyone has write-access to it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

logon script won't run..on logon 1
Nice easy one... 1
MPV - versitile fast lean player. 3
Windows XP Logon script location 3
Group Polocy - Logon Scripts 1
Discover logon script 4
logon script conflicts 2
Logon script problem 1

Top