Page 1 of 2 12>
Topic Options
#125914 - 2004-08-31 08:37 AM How to display message on logon
ozraelised Offline
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
#125915 - 2004-08-31 10:26 AM Re: How to display message on logon
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Group policy or HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeText
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#125916 - 2004-08-31 10:27 AM Re: How to display message on logon
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
Not sure about the 30 second bit though
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#125917 - 2004-08-31 02:19 PM Re: How to display message on logon
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
However...

The preferred method to use the LegalNoticeText is a GPO.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#125918 - 2004-08-31 05:47 PM Re: How to display message on logon
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

...before the user can log in



Since KiX runs AFTER logon, there is no KiX solution available for the current logon session.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125919 - 2004-08-31 05:56 PM Re: How to display message on logon
AzzerShaw Offline
Seasoned Scripter
****

Registered: 2003-02-20
Posts: 510
Loc: Cheltenham, England
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...)
_________________________
If at first you don't succeed, try again. Then quit. There's no use being a damn fool about it. - W.C Fields

Top
#125920 - 2004-08-31 06:13 PM Re: How to display message on logon
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
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.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125921 - 2005-07-18 03:37 PM Re: How to display message on logon
Radimus Moderator Offline
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



_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#125922 - 2005-07-18 04:12 PM Re: How to display message on logon
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
lol!
you are kidding, right?
this is so damn stupid!
_________________________
!

download KiXnet

Top
#125923 - 2005-07-18 04:37 PM Re: How to display message on logon
Radimus Moderator Offline
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
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#125924 - 2005-07-18 07:57 PM Re: How to display message on logon
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11623
Loc: CA
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.
 

Top
#125925 - 2005-07-18 10:13 PM Re: How to display message on logon
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1341
Loc: NL
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...
_________________________
Co


Top
#125926 - 2005-07-18 11:56 PM Re: How to display message on logon
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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


Edited by Lonkero (2005-07-18 11:59 PM)
_________________________
!

download KiXnet

Top
#125927 - 2005-07-19 12:49 AM Re: How to display message on logon
Radimus Moderator Offline
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.
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#125928 - 2005-07-19 01:30 AM Re: How to display message on logon
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Ja, 6 questions but only one chosen at random.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125929 - 2005-07-19 02:43 AM Re: How to display message on logon
romulus Offline
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
#125930 - 2005-07-19 03:07 AM Re: How to display message on logon
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
That code requires the user to have admin rights. A GPO would not.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#125931 - 2005-07-19 03:17 AM Re: How to display message on logon
romulus Offline
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 Offline
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>
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#125933 - 2005-07-19 04:21 AM Re: How to display message on logon
romulus Offline
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
Page 1 of 2 12>


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 248 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.072 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org