Discussion Locked

Logon script with company policies

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

I need a script to run on a NT4 domain that will apply to W9x,NT4,2000 & XP PCs.
I have tested a utility called Winoff which forcibly logs the user off when they select an option. The final script needs to work like this:
user logs on and sees a box come up displaying our companies security policies and email policies. The only options are I AGREE and I DISAGREE
now if they select I DISAGREE it will forcibly log them off.
obviously selecting I AGREE lets them carry on loggin in using Windows.
I did a test with a basic DOS batch file and found a couple problems:
By default the script minimises itself to taskbar.So i added line -Start /max logon.bat- which worked fine, and maximised the whole DOS window, but I would have liked the DOS Windows just to stay same size but come to the foreground, infront of everything else, not maximise.
My boss has asked whether we can get a better looking interface as DOS Windows aren't that pretty.
If anyone can help me with some code in something like vbscript or javascript for the test script below I would be very appreciated.
Also, is it possible for script to run before Windows loads on NT4 domain??
How do I stop the users closing script down and ignoring the question??

@ECHO OFF
:START
CLS
SET MyInput=
IF NOT '%1'=='' GOTO QUIT_MENU
ECHO 1. Yes I love working here
ECHO 2. No I absolutely hate it
ECHO 3. I'm only here because the misses is at home
ECHO 4. I have 5 credit cards to pay off, god damn it
ECHO 5. Quit
SET /P MyInput=Please choose how you feel about working at UBHT:
IF %MyInput% == 5 GOTO QUIT_MENU
IF %MyInput% == 4 GOTO CREDIT
IF %MyInput% == 3 GOTO MISSES
IF %MyInput% == 2 GOTO NO
IF %MyInput% == 1 GOTO YES
:YES
ECHO HA HA HA
PAUSE
GOTO START
:NO
ECHO You know where the door is
PAUSE
GOTO START
:MISSES
ECHO Ditch the chick, go on the doll
PAUSE
GOTO START
:CREDIT
ECHO Stop buying porn and cut up your credit cards
PAUSE
GOTO START
:QUIT_MENU
START WinOFF -logoff -force

1 reply

by inletgrovehs

You can always use a Visual Basic Script instead. This will allow you to have the user policy come up just like any other system warning message, error, or question. You can have it with Yes or No buttons and you desired results. I am currently using a login script off an NT4 server to do nearly the same thing. Let me know if you would like me to write a quick one up for you.

This discussion is closed to new replies.