ozraelised
(Getting the hang of it)
2004-08-31 08:37 AM
How to display message on logon

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


AzzerShaw
(Seasoned Scripter)
2004-08-31 10:26 AM
Re: How to display message on logon

Group policy or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeText

AzzerShaw
(Seasoned Scripter)
2004-08-31 10:27 AM
Re: How to display message on logon

Not sure about the 30 second bit though

Kdyer
(KiX Supporter)
2004-08-31 02:19 PM
Re: How to display message on logon

However...

The preferred method to use the LegalNoticeText is a GPO.

Kent


Les
(KiX Master)
2004-08-31 05:47 PM
Re: How to display message on logon

Quote:

...before the user can log in



Since KiX runs AFTER logon, there is no KiX solution available for the current logon session.


AzzerShaw
(Seasoned Scripter)
2004-08-31 05:56 PM
Re: How to display message on logon

Quote:


Since KiX runs AFTER logon, there is no KiX solution available for the current logon session.





Couldn't you just run a script to add the above reg entry on all pc's on the domain?

(Yeah i know its not the most ideal situation...)


Les
(KiX Master)
2004-08-31 06:13 PM
Re: How to display message on logon

Quote:

Couldn't you just run a script to add the above reg entry on all pc's on the domain?




Yes, you could but it would not apply to the current logon session, only subsequent ones. There is also the issue of admin rights. Better to deploy by GPO as it was intended.

Of course, if the requirement were changed to AFTER instead of BEFORE, then there are a variety of ways to display a message.


Radimus
(KiX Supporter)
2005-07-18 03:37 PM
Re: How to display message on logon

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





LonkeroAdministrator
(KiX Master Guru)
2005-07-18 04:12 PM
Re: How to display message on logon

lol!
you are kidding, right?
this is so damn stupid!


Radimus
(KiX Supporter)
2005-07-18 04:37 PM
Re: How to display message on logon

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


NTDOCAdministrator
(KiX Master)
2005-07-18 07:57 PM
Re: How to display message on logon

Welcome to America Lonk, land of the "We love to sue you" people. Yes, agree stupid, but that is the sort of things we live with now days in America all over the place.
 


Co
(MM club member)
2005-07-18 10:13 PM
Re: How to display message on logon

I have seen it at American companies in the Netherlands.... and YES I found it stupid too...
It is almost like an American car. You can't see it because all the warning stickers on it...


LonkeroAdministrator
(KiX Master Guru)
2005-07-18 11:56 PM
Re: How to display message on logon

no, I like the message idea itself.
but forcing a user to type 27 different words takes already about half'n hour out of his/her workday.

I mean, I understand fear of risks and the need to minimize them.
but there is always overshooting that management and making it the biggest risk.
I know, because I have fought with this shit at my former workplaces too.

I say, let the management hear.
just say to them in the most formal way you know: "You Stink!" or "you are stupid"

ps, did I mention, I'm unemployed


Radimus
(KiX Supporter)
2005-07-19 12:49 AM
Re: How to display message on logon

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.


Les
(KiX Master)
2005-07-19 01:30 AM
Re: How to display message on logon

Ja, 6 questions but only one chosen at random.

romulus
(Fresh Scripter)
2005-07-19 02:43 AM
Re: How to display message on logon

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


Les
(KiX Master)
2005-07-19 03:07 AM
Re: How to display message on logon

That code requires the user to have admin rights. A GPO would not.

romulus
(Fresh Scripter)
2005-07-19 03:17 AM
Re: How to display message on logon

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...


Radimus
(KiX Supporter)
2005-07-19 04:07 AM
Re: How to display message on logon

yes... we already have that, but no one reads it, as they just click OK and it does away.

Mine is a test <eg>


romulus
(Fresh Scripter)
2005-07-19 04:21 AM
Re: How to display message on logon

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...


Sealeopard
(KiX Master)
2005-07-19 05:15 AM
Re: How to display message on logon

Code:

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


What's this whole business with KiXGUI? The post script fragment doesn need it, it's completely outdated, and you're not even usign the silent registration parameter /S together with REGSVR32.

And if you would have read Rad's post correctly, he has been using such an approach wit the result that, according to HR, nobody read that darn thing.


Co
(MM club member)
2005-07-19 06:28 AM
Re: How to display message on logon

Quote:

no, I like the message idea itself.
but forcing a user to type 27 different words takes already about half'n hour out of his/her workday.

I mean, I understand fear of risks and the need to minimize them.
...




It is very simple... Put it in a contract. When you hire people they have to read and sign it.


LonkeroAdministrator
(KiX Master Guru)
2005-07-19 06:41 AM
Re: How to display message on logon

ja, co.
that sounds the european way to do it.
no stickers on each door but in the main entrance only.


NTDOCAdministrator
(KiX Master)
2005-07-19 08:09 AM
Re: How to display message on logon

ROFLMAO - You guys miss the point maybe. This is AMERICA we have both and we want more. SIGN, SIGN, SIGN, Aknowledge away till you've wasted an entire life of watching, filling out all these darn stupid things that no cares about until some money hungry lawyer pops his/her head into the picture and says "Hey, we can sue them and make some money".

Arg$%!@^@#^ Too bad life could not maintain the technology yet also maintain the simple life at the same time.
 


Co
(MM club member)
2005-07-19 12:31 PM
Re: How to display message on logon

To me it looks like Americans can't think for themself....

Radimus
(KiX Supporter)
2005-07-19 12:53 PM
Re: How to display message on logon

not as long as there are lawyers...

LonkeroAdministrator
(KiX Master Guru)
2005-07-19 01:17 PM
Re: How to display message on logon

that sounds accurate.

Sealeopard
(KiX Master)
2005-07-21 04:48 AM
Re: How to display message on logon

If you want paperwork, just go through an SOX audit, we just finished our section of it and the guys from KPMG are still all over us pooring through approximately 1000 pages of documentation for two databse servers and some financial reporting our 6-person group perform.