Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Could someone show me a script

Status
Not open for further replies.

StressedTechie

Technical User
Jul 13, 2001
367
GB
HI
I have created scripts to map network drives but i want to now put a purely cosmetic Good morning/afternoon "username" as they login.

Does anyone have an example of this that I can modify and put in.

Cheers
 
Getting the morning/afternoon would be a little more difficult as it would include processing the time of day. Here's the rest.

Code:
Greetings %USERNAME%, Welcome to %USERDOMAIN%.  Have a NICE day!

Jeff
I haven't lost my mind - I know it's backed up on tape somewhere ....
 
Rather, You don't say what scripting tools you are using or what OS. I use Kixtart on an NT 4.0 network. This is code I use in my logon.kix. I put the users first name in the Description box in usermgr then write that to the screen so the script checks the time then writes the appropriate greeting. Example "Good Morning User" or "Good Afternoon User". Then follow that with the day of the week and date. "Today is Tuesday"
"October 16, 2001"

IF ((@TIME > &quot;00:00:00&quot;) AND (@TIME < &quot;12:00:00&quot;))
AT (9,22) &quot;Good Morning&quot;
ELSE
IF ((@TIME >= &quot;12:00:00&quot;) AND (@TIME < &quot;18:00:00&quot;))
AT (9,22) &quot;Good Afternoon&quot;
ELSE
AT (9,22) &quot;Good Evening&quot;
ENDIF
ENDIF
AT (9,37) @COMMENT
AT (12,22) &quot;Today is &quot;@DAY
AT (14,22) @MONTH &quot; &quot; @MDAYNO &quot;, &quot; @YEAR

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top