Discussion Locked

Login script not working correctly

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,

I run a win2k network with a terminal server. My manager wanted me to incorporate a log in script that popped up a window to remind the user to release their time. I created a batch file called time.bat and placed it under the GroupPolicy. windows settings, logon folder so the entire domain will get the message. The syntax is as follows minus quotes: "NET SEND %computername% Make sure your time has been released through yesterday". The pop up works great when a user logs on but then it pops up everytime they open a terminal session for each application throughout the day. Also watching at my console I see the pop up on my terminal server constantly. One user showed me they had to click the okay 12 times until the pop up went away. I have taken the scrip out of Group policy because of complaints. If anyone has a suggestion...please let me know. I have a script that mapps drives...could I incorporate it there?

thanks,
Rob

5 replies

by d.walker5

This is the intended behavior, if a message is sent to the computername of a Terminal Server, all Client sessions will receive the message. This is similar to the functionality of the MSG * command.
Instead of %computername% use %user%.

by beermonster

Hi,
I'm with the previous respondent to a point, but using %username% will cause the popup to appear everywhere they are logged on. IE they log on locally and get the pop up message, then they open a terminal server session which causes the pop up to appear again on their TS session and also on their local machine. If they open another TS session, or log in again on a different machine without logging off the first the pop up will appear on both machines as well as every TS sessio they are using. This is better than what you have now, but only just. In your shoes, I would think it fair to say that I want the popup to appear for a local login only, and not appear at all on a TS session (bearing in mind that they probably logged in locally to be able to run a TS session in the first place. T do this I would alter the script to say

IF /I NOT %computername==yourterminalserversname
"NET SEND %computername% Make sure your time has been released through yesterday"

Note that ALL of the above should be on one line. This simply says 'as long as the computername isn't the terminal server then use the net send'. Hope this helps...

This discussion is closed to new replies.