#121784 - 2004-06-24 02:48 PM
Logon Message
|
DarrenBolton
Lurker
Registered: 2004-06-24
Posts: 4
|
Currently we are using Kixtart for our logon script on our Windows NT4 domain with mixed clients... 9x to xp.
Currently we have a message box that pops up when the user logs on, they then have to click ok to get rid of it.
What im wanting to know is what is the script I should use to bring up the multichoice box, so that if the user accepts the policy they remain logged on but if this press cancel, esc then they are logged off.
regards,
|
|
Top
|
|
|
|
#121786 - 2004-06-24 02:57 PM
Re: Logon Message
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Something like this...
Code:
$Selection = MessageBox("Do you accept the company policy?", "Policy", 68) If $Selection = 7 ; User selected "No" 'You must select "Yes" to logon to the domain...' ? Logoff(1) Endif
|
|
Top
|
|
|
|
#121787 - 2004-06-24 03:00 PM
Re: Logon Message
|
Shawn
Administrator
   
Registered: 1999-08-13
Posts: 8611
|
Code:
break on
$answer = MessageBox("Do you accept these terms?","Logon",3)
if $answer <> 6
; logoff(1)
endif
exit 1
Im getting old
|
|
Top
|
|
|
|
#121788 - 2004-06-24 03:05 PM
Re: Logon Message
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Quote:
I'm getting old
But like a fine wine you just get better with age.
|
|
Top
|
|
|
|
#121789 - 2004-06-24 03:06 PM
Re: Logon Message
|
DarrenBolton
Lurker
Registered: 2004-06-24
Posts: 4
|
cheers for the fast reply
Is it possible to pause the rest of the script.. ie drive mappings etc until the user clicks yes?
Also im not sure if this is possible but can u stop the desktop from loading until the use says yes?
and.... hehe is it possible to change the text on the buttons to I Accept and I Decline?
Edited by DarrenBolton (2004-06-24 03:08 PM)
|
|
Top
|
|
|
|
#121791 - 2004-06-24 03:12 PM
Re: Logon Message
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Quote:
...is it possible to change the text on the buttons to I Accept and I Decline?
Nope. Not without severely hacking the system API and changing "Yes" and "No" to "I Accept" and "I Decline" for all Yes/No buttons.
|
|
Top
|
|
|
|
#121793 - 2004-06-24 03:13 PM
Re: Logon Message
|
DarrenBolton
Lurker
Registered: 2004-06-24
Posts: 4
|
Quote:
By default, the messagebox will pause the script until the user responds. To delay the desktop build - google on the RunLogonScriptSync registry/GPO setting.
GPO isn't a option for us as we still have old 9x clients out and about and are running on NT4 Domains
|
|
Top
|
|
|
|
#121794 - 2004-06-24 03:14 PM
Re: Logon Message
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Or you could go to our very own FAQ
|
|
Top
|
|
|
|
#121796 - 2004-06-25 12:12 AM
Re: Logon Message
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Hmmm... better start eating if he followed Shawn's code.
Quote:
If it doesn't I'll eat a rat raw
Quote:
break on
$answer = MessageBox("Do you accept these terms?","Logon",3)
if $answer <> 6
; logoff(1)
endif
exit 1
Hell no I don't agree CTRL-C
|
|
Top
|
|
|
|
#121797 - 2004-06-25 02:28 AM
Re: Logon Message
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
Quote:
Hmmm... better start eating if he followed Shawn's code.
Nice try, Doc. Ctrl-C didn't stop the script for me. Even if it did, the question was "does script execution stop until the user responds to the messagebox," so I think I'd still be correct.
|
|
Top
|
|
|
|
#121798 - 2004-06-25 09:57 AM
Re: Logon Message
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
It didn't stop the script for you because you probably use WKIX32.EXE and not KIX32.EXE
So you're gonna woose out and stick by a minor technicality over wording eh! 
Dang... I was hoping to see that big old RAT dripping from your mouth.
|
|
Top
|
|
|
|
#121799 - 2004-06-25 10:12 AM
Re: Logon Message
|
DarrenBolton
Lurker
Registered: 2004-06-24
Posts: 4
|
thanks for all the help guys, really appreciated!
Its working a treat!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Henriques)
and 2516 anonymous users online.
|
|
|