Solved

Show birthday at logon

Posted on 2008-11-03
8
453 Views
Last Modified: 2011-03-03
Hello,
If have a question concerning kix. I'm not a developer. I have a logon script. And at the end I want to show a messagebox wich displays the birthday of the one logging on. This works fine with just one username, but I can't make it work if there are two or three people celebrating their birthday on the same day.

Thanks in advance.
$username = ""

Select 

	Case ("@MDAYNO" + "-" + "@MONTHNO") = '3-11'

		$myname= "Firstname Lastname"

		$username = "firtlast"

	Case ("@MDAYNO" + "-" + "@MONTHNO") = '12-11'

		$myname= "Testuser"

		$username = "test"

EndSelect
 

If $username = @USERID

	;user is logged in, congratulate him/her

	MessageBox ("Congrats!", "Message", 64, 5)

Else

	;user not logged in, show message it's his/her birthday

	If $username <> "" 

		MessageBox ($myname + " has a birthday!", "Message", 64, 5)

	EndIf

EndIf

Open in new window

0
Comment
Question by:Anonyymm
  • 4
  • 2
  • 2
8 Comments
 
LVL 63

Accepted Solution

by:
Zvonko earned 250 total points
ID: 22866277
Check this:
$message = ""

Select 

        Case ("@MDAYNO" + "-" + "@MONTHNO") = '3-11'

            If @USERID = "firtlast"

               MessageBox ("Congrats!", "Message", 64, 5)

            Else

               MessageBox ("Firstname Lastname  has a birthday!", "Message", 64, 5)

            EndIf     

        Case ("@MDAYNO" + "-" + "@MONTHNO") = '12-11'

            If (@USERID = "nextlast") OR (@USERID = "otheruser")

               MessageBox ("Congrats!", "Message", 64, 5)

            Else

               MessageBox ("Nextname Lastname and Other User do have a birthday!", "Message", 64, 5)

            EndIf     

EndSelect

Open in new window

0
 

Author Comment

by:Anonyymm
ID: 22866924
Thanks! I was thinking to difficult. I had the 'or', but was trying to make the "Nextname Lastname" and "Other User" variable.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 22867156
And why did you grade my support with a grade B?
0
 

Author Comment

by:Anonyymm
ID: 22874142
Because it is an good answer.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 63

Expert Comment

by:Zvonko
ID: 22878699
Next time you are also on my B list ;-)
0
 

Expert Comment

by:Tamooz
ID: 35024634
Hello,
I am also looking for a way to make a pop up on user's who celebrate their birthday.
scenario: a certain user in our company celebrates his birthday, he logs on his computer and gets a pop up that says Happy Birthday and etc.
Can the script above help me, and also how do i implement this script?
many thanks.
0
 

Expert Comment

by:Tamooz
ID: 35024682
also i would like to add...
I would like not only that the user will get the pop up, also i would like that the other people on the network will get a reminder for this event.
I suppose that i will need two scripts, but more important for me is that user in my workplace will know about special events like birthdays by pop ups.

Again thanks.
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 35024837
Open your own new fresh question please.
You can also reference to this question if you like.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now