N
Neko-
On a request of one of our HR users I've been asked to investigate the
possibility to show a pop-up box during the loginscript to alert users
to certain important messages. Our environment exists primarily of a
Windows 2000/2003 AD, with the workstations being active under Windows
2000 SP4.
I've done a bit of testing and found that NET SEND <username>
"message" would suit our needs best. The loginscript has therefore
been appended with the following (broken up in 3 parts):
Net use L: \\server\netlogon
L:
CD\files
Sc.exe config "messenger" start= auto
C:
Net start messenger
Net use L: /delete
Net send %username% "A notification goes here"
The first part is using the SC command Microsoft released to make sure
the 'Messenger Service' is set to automatically start. This incase
it's disabled through some means.
The second part initiates the acual starting of the 'Messenger
Service' incase this has not yet been started. If it has, it'll
generate an error, but overall nothing to worry about.
The last bit uses the %username% variable (which contains the username
of the user) to initiate the command to send a message to the locally
logged on user.
Now running this batchfile manually on any PC results in it doing
exactly what we expect it to do. The user receives a pop-up box with
the notice just as requested. When running this from the loginscript
however, it fails.
The last command is filled in with the correct username (this has been
verified by pausing the script and checking the actual command
syntaxes given), and then returns an error:
An error occurred while sending a message to <username>.
The message alias could not be found on the network.
More help is available by typing NET HELPMSG 2273.
What I have found is that this means the username is not yet known on
the network, eventho the user has just logged in and authenticated.
More mind-boggeling is the fact that after logging in (and the failure
exhibiting itself) and then running a manual session of the same login-
script results in it doing exactly what we would expect it to do,
namely pop-up the box.
Anyone have any thoughts on this?
Thanks in advance,
J. van Doornik
possibility to show a pop-up box during the loginscript to alert users
to certain important messages. Our environment exists primarily of a
Windows 2000/2003 AD, with the workstations being active under Windows
2000 SP4.
I've done a bit of testing and found that NET SEND <username>
"message" would suit our needs best. The loginscript has therefore
been appended with the following (broken up in 3 parts):
Net use L: \\server\netlogon
L:
CD\files
Sc.exe config "messenger" start= auto
C:
Net start messenger
Net use L: /delete
Net send %username% "A notification goes here"
The first part is using the SC command Microsoft released to make sure
the 'Messenger Service' is set to automatically start. This incase
it's disabled through some means.
The second part initiates the acual starting of the 'Messenger
Service' incase this has not yet been started. If it has, it'll
generate an error, but overall nothing to worry about.
The last bit uses the %username% variable (which contains the username
of the user) to initiate the command to send a message to the locally
logged on user.
Now running this batchfile manually on any PC results in it doing
exactly what we expect it to do. The user receives a pop-up box with
the notice just as requested. When running this from the loginscript
however, it fails.
The last command is filled in with the correct username (this has been
verified by pausing the script and checking the actual command
syntaxes given), and then returns an error:
An error occurred while sending a message to <username>.
The message alias could not be found on the network.
More help is available by typing NET HELPMSG 2273.
What I have found is that this means the username is not yet known on
the network, eventho the user has just logged in and authenticated.
More mind-boggeling is the fact that after logging in (and the failure
exhibiting itself) and then running a manual session of the same login-
script results in it doing exactly what we would expect it to do,
namely pop-up the box.
Anyone have any thoughts on this?
Thanks in advance,
J. van Doornik