#125914 - 2004-08-31 08:37 AM
How to display message on logon
|
ozraelised
Getting the hang of it
Registered: 2002-12-02
Posts: 59
Loc: Albury
|
Hi all,
I need to dispaly a message on the computers screen before the user can log in. This message will display some information for the users and should stay for about 30 sec.
Thanks
|
Top
|
|
|
|
#125917 - 2004-08-31 02:19 PM
Re: How to display message on logon
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
However...
The preferred method to use the LegalNoticeText is a GPO.
Kent
|
Top
|
|
|
|
#125921 - 2005-07-18 03:37 PM
Re: How to display message on logon
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
One of the most annoying scripts I have written
(for the users) Code:
$=setconsole("hide")
$System = CreateObject("Kixtart.System")
;KD START
;************* Form ************** $Form = $System.Form() $Form.BackColor = 41,5,161 $Form.ControlBox = "False" $Form.ForeColor = 255,0,0 $Form.Height = 480 $Form.StartPosition = 1 $Form.Text = "Computer Use Agreement" $Form.Width = 640 ;**************************************
;************* TextBox1 ************** $TextBox1 = $Form.Controls.TextBox("", 45, 105, 536, 188) $TextBox1.FontSize = 12 $TextBox1.Multiline = "True" ;**************************************
;************* Label1 ************** $Label1 = $Form.Controls.Label("", 45, 315, 536, 37) $Label1.BackColor = 41,5,161 $Label1.FontBold = "True" $Label1.FontName = "Arial" $Label1.FontSize = 11 $Label1.ForeColor = 255,255,255 ;**************************************
;************* ResponseTextBox ************** $ResponseTextBox = $Form.Controls.TextBox("", 255, 360, 135, 20) $ResponseTextBox.OnTextChanged = "UserInput()" ;**************************************
;************* Label2 ************** $Label2 = $Form.Controls.Label("Company", 225, 0, 213, 71) $Label2.BackColor = 41,5,161 $Label2.FontBold = "True" $Label2.FontItalic = "True" $Label2.FontName = "Arial" $Label2.FontSize = 48 $Label2.ForeColor = 255,255,255 ;**************************************
;************* Label3 ************** $Label3 = $Form.Controls.Label("Company text line", 165, 75, 345, 19) $Label3.BackColor = 41,5,161 $Label3.FontBold = "True" $Label3.FontName = "Arial" $Label3.ForeColor = 237,46,56 ;**************************************
;************* Logoff ************** $Logoff = $Form.Controls.Button("Log Off Computer", 45, 390, 113, 25) $Logoff.FontBold = "True" $Logoff.OnClick = "LogoffPC()" ;**************************************
;************* Accept ************** $Accept = $Form.Controls.Button("Accept Agreement", 465, 390, 124, 26) $Accept.Enabled = "False" $Accept.FontBold = "True" $Accept.OnClick = "AcceptClicked()" ;**************************************
;KD END
$Form.FormBorderStyle = 0 $Form.TopMost = "True"
$TextBox1.text= "WARNING! By accessing this system you are consenting to system monitoring " + "and agreeing to follow the Agency's policies regarding acceptable use, " + "protection of information resources, and confidential health care information. "+ "Improper or illegal use of this computer may subject you to an investigation " + "and could result in either disciplinary action in accordance with the Agency's "+ "standards, or possible civil or criminal penalties."
$rtext = "To acknowledge your acceptance of this policy, please "
DIM $randtext[6], $randansw[6]
$randtext[0] = 'enter the last word from the statement above' $randtext[1] = 'enter the word after "disciplinary"' $randtext[2] = 'enter the all capitalized word' $randtext[3] = 'enter the word after "consenting to system __________"' $randtext[4] = 'enter the missing word from "possible _____ or criminal penalties"' $randtext[5] = 'enter the missing word from "Improper or _______ use of this computer"'
$randansw[0] = 'penalties' $randansw[1] = 'action' $randansw[2] = 'WARNING' $randansw[3] = 'monitoring' $randansw[4] = 'civil' $randansw[5] = 'illegal'
$rc=SRND(@ticks) $question = rnd(ubound($randtext)-1) $answer = $randansw[$question]
$Label1.text = $rtext + $randtext[$question]
$Form.Show While $Form.Visible $=Execute($Form.DoEvents()) Loop Exit 1
Function AcceptClicked() Quit EndFunction
Function UserInput() if instr($ResponseTextBox.Text , $answer) $Accept.Enabled = "True" else $Accept.Enabled = "False" endif EndFunction
Function LogoffPC()
EndFunction
|
Top
|
|
|
|
#125923 - 2005-07-18 04:37 PM
Re: How to display message on logon
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
oh no... I was given specific directions to make it as obvious, in-your-face, and annoying as possible.
Managemane LOVES it, I'm going to insert a "hidden" hotkey to close it
|
Top
|
|
|
|
#125927 - 2005-07-19 12:49 AM
Re: How to display message on logon
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
We had the same text in the normal "legal logon warning text", but after years the HR dept did a quick informal survey and determined that no one knew what it said.. they just pressed the OK button.
There may not be 6 questions in the final version, nor may those be the question, but there will be SOME variable data entered in the box.
|
Top
|
|
|
|
#125929 - 2005-07-19 02:43 AM
Re: How to display message on logon
|
romulus
Fresh Scripter
Registered: 2005-07-19
Posts: 8
|
follow the next few steps for message that comes up when you hit ctrl/alt/del
1.copy/paste the following code in notepad and name it LegalNotice.kix
CLS BREAK ON WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS NT\CURRENTVERSION\WINLOGON", "LegalNoticeCaption", "Company Name. Legal Notice:", "REG_SZ") IF @ERROR = 0 ENDIF WRITEVALUE ("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WINDOWS NT\CURRENTVERSION\WINLOGON", "LegalNoticeText", "All activity may be monitored. System use indicates consent to monitoring. Information may be given to law enforcement.", "REG_SZ") ? "VALUE WRITTEN TO REGISTRY" IF @ERROR = 0 ENDIF
2. copy/paste Kix32.exe and kixgui.dll into your c:\windows\system32
3. than go to start\run and wright regsvr32 kixgui.dll
4. msg will come up "kixgui.dll registered succesfully
5. go to where you keep the file you created earlier, Legalnotice.kix together with kix32.exe and drag/drop the legalnotice over the .exe
6. lon off and when you hit ctrl\alt\del you should have the legalnotice. after you click ok on that you could log on..
hope this helps
|
Top
|
|
|
|
#125931 - 2005-07-19 03:17 AM
Re: How to display message on logon
|
romulus
Fresh Scripter
Registered: 2005-07-19
Posts: 8
|
well, i think that if you want to set this up on a pc yes but than as a user it wouldn't matter. a user just loggin on would have to read that msg and ok-it before it could do so...i think...
|
Top
|
|
|
|
#125932 - 2005-07-19 04:07 AM
Re: How to display message on logon
|
Radimus
Moderator
Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
|
yes... we already have that, but no one reads it, as they just click OK and it does away.
Mine is a test <eg>
|
Top
|
|
|
|
#125933 - 2005-07-19 04:21 AM
Re: How to display message on logon
|
romulus
Fresh Scripter
Registered: 2005-07-19
Posts: 8
|
true, true...it does away. on the other hand you're not gonna have many friends between the users with that test i reckon and even if they read it they wouldn't probably care about that legelnotice anyway. maybe...don't know...
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 382 anonymous users online.
|
|
|