Help with vbscript to display a message

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 13 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
eyob
Posts: 2
Last visit: Fri Apr 23, 2010 2:08 am

Help with vbscript to display a message

Post by eyob »

I am trying to do the following:
Instead of disabling a user, I want to display to the user a custome message that says why his account is disabled by reading from a directory that contains a txt file under his/her name, eg user1.txt, user2.txt. If user1 logins gets the message under his name, if user2 logis gets the message under his loginname then the script automatically logs off the user. I can do this by moving the user to a diff OU, but since I have 4 OU, I will not know where to put him back ones user is enabled. Instead I want to display a message to him and log him off and he will act on what the messge says.
Thanks
eyob
Feel free to email to eyob2002000@yahoo.com
User avatar
eyob
Posts: 2
Last visit: Fri Apr 23, 2010 2:08 am

Help with vbscript to display a message

Post by eyob »

I am trying to do the following:
Instead of disabling a user, I want to display to the user a custome message that says why his account is disabled by reading from a directory that contains a txt file under his/her name, eg user1.txt, user2.txt. If user1 logins gets the message under his name, if user2 logis gets the message under his loginname then the script automatically logs off the user. I can do this by moving the user to a diff OU, but since I have 4 OU, I will not know where to put him back ones user is enabled. Instead I want to display a message to him and log him off and he will act on what the messge says.
Thanks
eyob
Feel free to email to eyob2002000@yahoo.com
User avatar
rasimmer
Posts: 182
Last visit: Fri Apr 25, 2014 7:00 am

Help with vbscript to display a message

Post by rasimmer »

Well, first question. Why ARE you disabling the account? How are planning on displaying this message? When the user attempts to login, they're going to get a standard windows message that their account has been disabled and to contact the administrator. They won't run any login scripts, so how do you even intend to populate such a message?
User avatar
rasimmer
Posts: 182
Last visit: Fri Apr 25, 2014 7:00 am

Help with vbscript to display a message

Post by rasimmer »

Woo hoo...I'm right....I think that make me 1 for 314
This topic is 13 years and 11 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked