#56517 - 2001-06-14 04:32 AM
Msgbox to end script
|
dbortunk
Fresh Scripter
Registered: 2001-05-18
Posts: 36
Loc: USA
|
Ok, I think this one is easy. I would like to write a little script in the beginning of the login script that will see if a user is a domain admin. If he is then it will prompt him whether the login script should be processed or not. If he clicks yes the login script will process if no then it will exit. Any suggestions? I was thinking msgbox but i am not sure how to do this.
|
|
Top
|
|
|
|
#56519 - 2001-06-15 04:28 AM
Re: Msgbox to end script
|
dbortunk
Fresh Scripter
Registered: 2001-05-18
Posts: 36
Loc: USA
|
Ok thanks that worked but now i want it also to look if you are loggin into an NT server as well (NT 4.0 and 2000 servers). I've tried different things but they don't work. It just logs in without running the script. I know this is easy but i can't figure it out.$rtn=ReadValue("hkey_local_machine\system\currentcontrolset\control\productoptions","producttype") $execute_mode="yes" IF (INGROUP("Domain Admins") <> 0 AND ($rtn="SERVERNT")) $answer=MessageBox("Administrator, do you want to run the login script?","Message",20,60) IF ($answer = 7) ; - 7 = No - $execute_mode="no" ELSE ; - 6 = Yes / -1 = No response from user - $execute_mode="yes" ENDIF ENDIF IF ($execute_mode <> "yes") GOTO end_script ENDIF
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 2220 anonymous users online.
|
|
|