Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Windows Server » microsoft.public.windows.server.scripting
Thread: YES NO Logon Script

HTVi
TV Discussion Newsgroups

YES NO Logon Script
"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> 6/27/2007 4:51:45 PM
Hi There,

I am looking to find a way to make a login script that displays a message
box just before explorer.exe is loaded that shows a yes and no button for
example,

*Disclaimer*

Blah, Blah blah

Do you agree

Yes No

bad example but its to get end users to agree to terms and conditions if
they press no then the system logs off without loading explorer.exe so maybe
a script that is invoked before explorer.exe loads that halts the loading
process until either yess or no is pressed.

I know it is possible they use such TOA's in libraries

Re: YES NO Logon Script
Jeffery Hicks <jhicks[ at ]sapien.com> 6/27/2007 8:32:21 PM
Matt Setters wrote:
[Quoted Text]
> Hi There,
>
> I am looking to find a way to make a login script that displays a
> message box just before explorer.exe is loaded that shows a yes and no
> button for example,
>
> *Disclaimer*
>
> Blah, Blah blah
>
> Do you agree
>
> Yes No
>
> bad example but its to get end users to agree to terms and conditions
> if they press no then the system logs off without loading explorer.exe
> so maybe a script that is invoked before explorer.exe loads that halts
> the loading process until either yess or no is pressed.
>
> I know it is possible they use such TOA's in libraries

That is very hard to do with a logon script because once the process
starts, you can't really stop it. There are some hacks I can come up
with, but most people get by with using Group Policy to display the
logon message. There's no way it can be avoided so logging on indicates
you've read it.

--
Jeffery Hicks
SAPIEN Technologies - Scripting, Simplified.

blog: http://blog.SAPIEN.com
Community: http://www.scriptinganswers.com
Training: http://www.ScriptingTraining.com
Books: http://www.SAPIENPress.com
Editor: http://www.primalscript.com
Tools: http://www.scriptingoutpost.com

"Those who forget to script it are doomed to repeat it."

Re: YES NO Logon Script
"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> 6/27/2007 9:31:37 PM
Thanks Jeff if you could send me the info it would be appreciated


"Jeffery Hicks" <jhicks[ at ]sapien.com> wrote in message
news:OGAGEpPuHHA.4412[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> Matt Setters wrote:
>> Hi There,
>>
>> I am looking to find a way to make a login script that displays a message
>> box just before explorer.exe is loaded that shows a yes and no button for
>> example,
>>
>> *Disclaimer*
>>
>> Blah, Blah blah
>>
>> Do you agree
>>
>> Yes No
>>
>> bad example but its to get end users to agree to terms and conditions if
>> they press no then the system logs off without loading explorer.exe so
>> maybe a script that is invoked before explorer.exe loads that halts the
>> loading process until either yess or no is pressed.
>>
>> I know it is possible they use such TOA's in libraries
>
> That is very hard to do with a logon script because once the process
> starts, you can't really stop it. There are some hacks I can come up
> with, but most people get by with using Group Policy to display the logon
> message. There's no way it can be avoided so logging on indicates you've
> read it.
>
> --
> Jeffery Hicks
> SAPIEN Technologies - Scripting, Simplified.
>
> blog: http://blog.SAPIEN.com
> Community: http://www.scriptinganswers.com
> Training: http://www.ScriptingTraining.com
> Books: http://www.SAPIENPress.com
> Editor: http://www.primalscript.com
> Tools: http://www.scriptingoutpost.com
>
> "Those who forget to script it are doomed to repeat it."
>

Re: YES NO Logon Script
"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> 6/28/2007 9:24:08 AM
Still need a viable solution to this does anyone have any ideas at all...???

TIA Matt


"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
[Quoted Text]
> Hi There,
>
> I am looking to find a way to make a login script that displays a message
> box just before explorer.exe is loaded that shows a yes and no button for
> example,
>
> *Disclaimer*
>
> Blah, Blah blah
>
> Do you agree
>
> Yes No
>
> bad example but its to get end users to agree to terms and conditions if
> they press no then the system logs off without loading explorer.exe so
> maybe a script that is invoked before explorer.exe loads that halts the
> loading process until either yess or no is pressed.
>
> I know it is possible they use such TOA's in libraries

Re: YES NO Logon Script
"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> 6/28/2007 8:29:58 PM
Has anyone got any ideas i know Message Manager Deluxe does it but its like
$500 and we dont have the type of budget.

I am looking for a simple solution and no i dont want to use the legal
notice in GPO

"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
news:7A2DD62B-9925-4C04-8AF3-5D7A5430B6AD[ at ]microsoft.com...
[Quoted Text]
> Still need a viable solution to this does anyone have any ideas at
> all...???
>
> TIA Matt
>
>
> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
> news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
>> Hi There,
>>
>> I am looking to find a way to make a login script that displays a message
>> box just before explorer.exe is loaded that shows a yes and no button for
>> example,
>>
>> *Disclaimer*
>>
>> Blah, Blah blah
>>
>> Do you agree
>>
>> Yes No
>>
>> bad example but its to get end users to agree to terms and conditions if
>> they press no then the system logs off without loading explorer.exe so
>> maybe a script that is invoked before explorer.exe loads that halts the
>> loading process until either yess or no is pressed.
>>
>> I know it is possible they use such TOA's in libraries
>

Re: YES NO Logon Script
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 6/29/2007 3:32:44 AM

"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
news:7A2DD62B-9925-4C04-8AF3-5D7A5430B6AD[ at ]microsoft.com...
[Quoted Text]
> Still need a viable solution to this does anyone have any ideas at
> all...???

As someone else noted, there is no viable solution that makes this approach
any more accountable than using the equivalent facility that is built-in to
windows.

That said, what action do you want the script to perform if the user clicks
on the NO button? If this does not make it impossible to actually use the
computer (and that is a difficult proposition), then there is no protection,
because a reasonable person would assume that a no answer would keep them
out (just like not agreeing to a software license prevents installation from
continuing). From a legal perspective, all you need do is demonstrate that a
disclaimer/warning was displayed in such a manner that a reasonable person
would have a hard time saying they were completely unaware of what it said.

If you still want to proceed, here's a possibilty: put this into a .vbs
file:

select case msgbox("{conditions of use text goes here}", _
vbquestion or vbyesno)
case vbyes
msgbox "having agreed, you may use this computer"
case vbno
msgbox "having NOT agreed, you should immediately log out"
end select

and running it from your batch logon script with:

cscript //nologo {path}\warning.vbs

And be sure to tell us how well this actually meets your needs.

/Al

> TIA Matt
>
>
> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
> news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
>> Hi There,
>>
>> I am looking to find a way to make a login script that displays a message
>> box just before explorer.exe is loaded that shows a yes and no button for
>> example,
>>
>> *Disclaimer*
>>
>> Blah, Blah blah
>>
>> Do you agree
>>
>> Yes No
>>
>> bad example but its to get end users to agree to terms and conditions if
>> they press no then the system logs off without loading explorer.exe so
>> maybe a script that is invoked before explorer.exe loads that halts the
>> loading process until either yess or no is pressed.
>>
>> I know it is possible they use such TOA's in libraries
>


Re: YES NO Logon Script
"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> 6/29/2007 6:21:17 AM
Hi Al,

How and were do i put that script i know how to put that into a .vbs but
what is the sript text for example on AD it would be like SBS_LOGIN.BAT

i am just wondering what the batch script consists of.


"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> wrote in message
news:%23M78p4fuHHA.1768[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
>
> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
> news:7A2DD62B-9925-4C04-8AF3-5D7A5430B6AD[ at ]microsoft.com...
>> Still need a viable solution to this does anyone have any ideas at
>> all...???
>
> As someone else noted, there is no viable solution that makes this
> approach any more accountable than using the equivalent facility that is
> built-in to windows.
>
> That said, what action do you want the script to perform if the user
> clicks on the NO button? If this does not make it impossible to actually
> use the computer (and that is a difficult proposition), then there is no
> protection, because a reasonable person would assume that a no answer
> would keep them out (just like not agreeing to a software license prevents
> installation from continuing). From a legal perspective, all you need do
> is demonstrate that a disclaimer/warning was displayed in such a manner
> that a reasonable person would have a hard time saying they were
> completely unaware of what it said.
>
> If you still want to proceed, here's a possibilty: put this into a .vbs
> file:
>
> select case msgbox("{conditions of use text goes here}", _
> vbquestion or vbyesno)
> case vbyes
> msgbox "having agreed, you may use this computer"
> case vbno
> msgbox "having NOT agreed, you should immediately log out"
> end select
>
> and running it from your batch logon script with:
>
> cscript //nologo {path}\warning.vbs
>
> And be sure to tell us how well this actually meets your needs.
>
> /Al
>
>> TIA Matt
>>
>>
>> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
>> news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
>>> Hi There,
>>>
>>> I am looking to find a way to make a login script that displays a
>>> message box just before explorer.exe is loaded that shows a yes and no
>>> button for example,
>>>
>>> *Disclaimer*
>>>
>>> Blah, Blah blah
>>>
>>> Do you agree
>>>
>>> Yes No
>>>
>>> bad example but its to get end users to agree to terms and conditions
>>> if they press no then the system logs off without loading explorer.exe
>>> so maybe a script that is invoked before explorer.exe loads that halts
>>> the loading process until either yess or no is pressed.
>>>
>>> I know it is possible they use such TOA's in libraries
>>
>
>

Re: YES NO Logon Script
"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> 6/29/2007 6:28:05 AM
Ok Al that worked however i do need one more thing in the code and that is
that when you press no you are told you are about to be logged out then
executes logoff.exe

so like press NO then "Having NOT agreed, you will be automatically logged
out in 10 seconds which would mean i need a 10 second countdown too and not
to sound demanding because idont mean to i need the X in the corner to be
hidden.

if anyone is willing to assist with the .vbs script i would be so so so
greatful and it will havesovled something that has taken me 6 months to find
a solution for.

And a big thanks to Al as he has given me something that everyone else said
was impossible.


"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> wrote in message
news:%23M78p4fuHHA.1768[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
>
> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
> news:7A2DD62B-9925-4C04-8AF3-5D7A5430B6AD[ at ]microsoft.com...
>> Still need a viable solution to this does anyone have any ideas at
>> all...???
>
> As someone else noted, there is no viable solution that makes this
> approach any more accountable than using the equivalent facility that is
> built-in to windows.
>
> That said, what action do you want the script to perform if the user
> clicks on the NO button? If this does not make it impossible to actually
> use the computer (and that is a difficult proposition), then there is no
> protection, because a reasonable person would assume that a no answer
> would keep them out (just like not agreeing to a software license prevents
> installation from continuing). From a legal perspective, all you need do
> is demonstrate that a disclaimer/warning was displayed in such a manner
> that a reasonable person would have a hard time saying they were
> completely unaware of what it said.
>
> If you still want to proceed, here's a possibilty: put this into a .vbs
> file:
>
> select case msgbox("{conditions of use text goes here}", _
> vbquestion or vbyesno)
> case vbyes
> msgbox "having agreed, you may use this computer"
> case vbno
> msgbox "having NOT agreed, you should immediately log out"
> end select
>
> and running it from your batch logon script with:
>
> cscript //nologo {path}\warning.vbs
>
> And be sure to tell us how well this actually meets your needs.
>
> /Al
>
>> TIA Matt
>>
>>
>> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
>> news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
>>> Hi There,
>>>
>>> I am looking to find a way to make a login script that displays a
>>> message box just before explorer.exe is loaded that shows a yes and no
>>> button for example,
>>>
>>> *Disclaimer*
>>>
>>> Blah, Blah blah
>>>
>>> Do you agree
>>>
>>> Yes No
>>>
>>> bad example but its to get end users to agree to terms and conditions
>>> if they press no then the system logs off without loading explorer.exe
>>> so maybe a script that is invoked before explorer.exe loads that halts
>>> the loading process until either yess or no is pressed.
>>>
>>> I know it is possible they use such TOA's in libraries
>>
>
>

Re: YES NO Logon Script
"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> 6/29/2007 2:32:20 PM
Can anyone elaborate on the script Al Dunbar wrote down for me


"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
[Quoted Text]
> Hi There,
>
> I am looking to find a way to make a login script that displays a message
> box just before explorer.exe is loaded that shows a yes and no button for
> example,
>
> *Disclaimer*
>
> Blah, Blah blah
>
> Do you agree
>
> Yes No
>
> bad example but its to get end users to agree to terms and conditions if
> they press no then the system logs off without loading explorer.exe so
> maybe a script that is invoked before explorer.exe loads that halts the
> loading process until either yess or no is pressed.
>
> I know it is possible they use such TOA's in libraries

Re: YES NO Logon Script
"Lanwench [MVP - Exchange]" <lanwench[ at ]heybuddy.donotsendme.unsolicitedmailatyahoo.com> 6/30/2007 1:29:05 PM
Matt Setters <mattsetters[ at ]blueyonder.co.uk> wrote:
[Quoted Text]
> Has anyone got any ideas i know Message Manager Deluxe does it but
> its like $500 and we dont have the type of budget.
>
> I am looking for a simple solution and no i dont want to use the legal
> notice in GPO
>
I don't understand why, since this will a) provide the settings you're
looking for and b) force the user to click OK, indicating a Yes....as others
have mentioned, from a legal standpoint, this is a better solution.

<snip>


Re: YES NO Logon Script
"user" <a> 7/2/2007 2:26:34 PM
Just thought I'd stick my 2 cents in....

Why add the message to the logon box? That's what we do here. By logging on
users are agreeing to terms and conditions.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]
"LogonPrompt"="Your message goes here."

Bilbo

"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
news:EC3BAFF6-7F3B-47F5-BD52-731D1BFB37A2[ at ]microsoft.com...
[Quoted Text]
> Can anyone elaborate on the script Al Dunbar wrote down for me
>
>
> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
> news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
>> Hi There,
>>
>> I am looking to find a way to make a login script that displays a message
>> box just before explorer.exe is loaded that shows a yes and no button for
>> example,
>>
>> *Disclaimer*
>>
>> Blah, Blah blah
>>
>> Do you agree
>>
>> Yes No
>>
>> bad example but its to get end users to agree to terms and conditions if
>> they press no then the system logs off without loading explorer.exe so
>> maybe a script that is invoked before explorer.exe loads that halts the
>> loading process until either yess or no is pressed.
>>
>> I know it is possible they use such TOA's in libraries
>


Re: YES NO Logon Script
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 7/2/2007 11:41:26 PM

"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
news:B2882858-A9D5-43A6-BD72-8C4D899CBA5A[ at ]microsoft.com...
[Quoted Text]
> Hi Al,
>
> How and were do i put that script i know how to put that into a .vbs but
> what is the sript text for example on AD it would be like SBS_LOGIN.BAT
>
> i am just wondering what the batch script consists of.

As I mentioned below, the batch script would need to contain a command such
as:

cscript //nologo {path}\warning.vbs

If warning.vbs is in the same folder as SBS_LOGIN.BAT, then you could derive
the path from the path to the batch file:

cscript //nologo "%~dp0\warning.vbs"

/Al

>
>
> "Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> wrote in message
> news:%23M78p4fuHHA.1768[ at ]TK2MSFTNGP04.phx.gbl...
>>
>> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
>> news:7A2DD62B-9925-4C04-8AF3-5D7A5430B6AD[ at ]microsoft.com...
>>> Still need a viable solution to this does anyone have any ideas at
>>> all...???
>>
>> As someone else noted, there is no viable solution that makes this
>> approach any more accountable than using the equivalent facility that is
>> built-in to windows.
>>
>> That said, what action do you want the script to perform if the user
>> clicks on the NO button? If this does not make it impossible to actually
>> use the computer (and that is a difficult proposition), then there is no
>> protection, because a reasonable person would assume that a no answer
>> would keep them out (just like not agreeing to a software license
>> prevents installation from continuing). From a legal perspective, all you
>> need do is demonstrate that a disclaimer/warning was displayed in such a
>> manner that a reasonable person would have a hard time saying they were
>> completely unaware of what it said.
>>
>> If you still want to proceed, here's a possibilty: put this into a .vbs
>> file:
>>
>> select case msgbox("{conditions of use text goes here}", _
>> vbquestion or vbyesno)
>> case vbyes
>> msgbox "having agreed, you may use this computer"
>> case vbno
>> msgbox "having NOT agreed, you should immediately log out"
>> end select
>>
>> and running it from your batch logon script with:
>>
>> cscript //nologo {path}\warning.vbs
>>
>> And be sure to tell us how well this actually meets your needs.
>>
>> /Al
>>
>>> TIA Matt
>>>
>>>
>>> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
>>> news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
>>>> Hi There,
>>>>
>>>> I am looking to find a way to make a login script that displays a
>>>> message box just before explorer.exe is loaded that shows a yes and no
>>>> button for example,
>>>>
>>>> *Disclaimer*
>>>>
>>>> Blah, Blah blah
>>>>
>>>> Do you agree
>>>>
>>>> Yes No
>>>>
>>>> bad example but its to get end users to agree to terms and conditions
>>>> if they press no then the system logs off without loading explorer.exe
>>>> so maybe a script that is invoked before explorer.exe loads that halts
>>>> the loading process until either yess or no is pressed.
>>>>
>>>> I know it is possible they use such TOA's in libraries
>>>
>>
>>
>


Re: YES NO Logon Script
"Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> 7/2/2007 11:51:08 PM

"Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
news:5A767DD9-E427-431D-AF5D-6C3E98DFD8A0[ at ]microsoft.com...
[Quoted Text]
> Ok Al that worked however i do need one more thing in the code and that is
> that when you press no you are told you are about to be logged out then
> executes logoff.exe

A WSH script can run an executable using the .run method as noted here:

http://msdn2.microsoft.com/en-us/library/d5fk67ky.aspx

> so like press NO then "Having NOT agreed, you will be automatically logged
> out in 10 seconds which would mean i need a 10 second countdown too and
> not to sound demanding because idont mean to i need the X in the corner to
> be hidden.

If you play games like that with someone wanting to use your system for
nefarious purposes, you will lose,

> if anyone is willing to assist with the .vbs script i would be so so so
> greatful and it will havesovled something that has taken me 6 months to
> find a solution for.
>
> And a big thanks to Al as he has given me something that everyone else
> said was impossible.

I don't recall anyone saying this was impossible to do, just that it was
impossible to make it as authoritative a mechanism for proving that anyone
using your system had seen the legal warning. I tried to give you what you
wanted even thought I don't think it is in your best interest. But I think
there have been enough warnings to you here that I will not fear a lawsuit
should you find out this is as legally reliable as the LogonPrompt registry
value.

/Al

> "Al Dunbar" <AlanDrub[ at ]hotmail.com.nospaam> wrote in message
> news:%23M78p4fuHHA.1768[ at ]TK2MSFTNGP04.phx.gbl...
>>
>> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
>> news:7A2DD62B-9925-4C04-8AF3-5D7A5430B6AD[ at ]microsoft.com...
>>> Still need a viable solution to this does anyone have any ideas at
>>> all...???
>>
>> As someone else noted, there is no viable solution that makes this
>> approach any more accountable than using the equivalent facility that is
>> built-in to windows.
>>
>> That said, what action do you want the script to perform if the user
>> clicks on the NO button? If this does not make it impossible to actually
>> use the computer (and that is a difficult proposition), then there is no
>> protection, because a reasonable person would assume that a no answer
>> would keep them out (just like not agreeing to a software license
>> prevents installation from continuing). From a legal perspective, all you
>> need do is demonstrate that a disclaimer/warning was displayed in such a
>> manner that a reasonable person would have a hard time saying they were
>> completely unaware of what it said.
>>
>> If you still want to proceed, here's a possibilty: put this into a .vbs
>> file:
>>
>> select case msgbox("{conditions of use text goes here}", _
>> vbquestion or vbyesno)
>> case vbyes
>> msgbox "having agreed, you may use this computer"
>> case vbno
>> msgbox "having NOT agreed, you should immediately log out"
>> end select
>>
>> and running it from your batch logon script with:
>>
>> cscript //nologo {path}\warning.vbs
>>
>> And be sure to tell us how well this actually meets your needs.
>>
>> /Al
>>
>>> TIA Matt
>>>
>>>
>>> "Matt Setters" <mattsetters[ at ]blueyonder.co.uk> wrote in message
>>> news:6F67792A-F9C9-406E-9929-551ABCA675CE[ at ]microsoft.com...
>>>> Hi There,
>>>>
>>>> I am looking to find a way to make a login script that displays a
>>>> message box just before explorer.exe is loaded that shows a yes and no
>>>> button for example,
>>>>
>>>> *Disclaimer*
>>>>
>>>> Blah, Blah blah
>>>>
>>>> Do you agree
>>>>
>>>> Yes No
>>>>
>>>> bad example but its to get end users to agree to terms and conditions
>>>> if they press no then the system logs off without loading explorer.exe
>>>> so maybe a script that is invoked before explorer.exe loads that halts
>>>> the loading process until either yess or no is pressed.
>>>>
>>>> I know it is possible they use such TOA's in libraries
>>>
>>
>>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen