Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

I have successfully design the auto login with the below link example.

http://www.microsoft.com/en-us/download/details.aspx?id=4057&hash=xingrGZI1z0OJUXZ9agI1iC5Jah0oQJ8dFbSUaOF%2bkHr7hNw2hpCrwE1yQL5aFVFrhOxAE27%2bTCEHpKEB%2bkMww%3d%3d

I have one issue regarding it.When some user has enable legal notice during log On window.
This Notice is enable though the registry: HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\LegalNoticeTextIt .It shows the Message prompt as shown in below screen.Without click on Ok button it couldn't auto login in the system.

Can any one suggest how to "Enter" this OK button programmatically.
Or
Is there any way to By pass this message?

For the screen refer the below link,
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/0df3c4c1-7d45-40f2-a0cb-373aeccae892/by-pass-legal-notice-during-auto-login-programmatically?forum=windowssecurity[^]

Best,
Mahen
Posted
Comments
CHill60 10-Apr-14 7:31am    
The whole point of a legal notice is that the User *must* indicate that they have read it ... each time they log on.
GAJERA 10-Apr-14 8:00am    
You are right ,but is there are way to click on this OK button programmatically after some delay.
Philippe Mori 10-Apr-14 21:55pm    
Ask the one who configure the system that way to remove it. If he responds that the message has to be there for legal reason, then you don't want to bypass it. You should avoid doing illegal things.
GAJERA 17-Apr-14 6:27am    
Can i get the window handle "Legal Notification Dialog Box"
surendra mudragada 15-Nov-23 8:11am    
Hey, did you find a solution for this ?

AFIK there is no way to do this short of disabling the legal notice, which you may not be able to do.

There are a couple of discussions on this topic available via Google.

As I said, the whole point of these messages is the user must postively indicate that they have read, and agree to, the message before proceeding. In many most cases it constitutes a legal agreement - as it does in the example message you have given.

Trying to bypass this could be constituted as hacking, and against the principles of this site (and others). Be careful how you proceed.
 
Share this answer
 
If the said computers are included in a domain, you can disable the connection message with an appropriate GPO.
If not, you then have to go on each of these and disable this message by hand.

But beware: if you are not an IT administrator for these computers, you may break some rules and face some troubles for that.
 
Share this answer
 
Comments
GAJERA 17-Apr-14 2:39am    
Is there any way to click on ok button programmatically?
Here i have try it with SendKeys.SendWait("{ENTER}") function.
I have fire this command through the service.But it couldn't work.
By the have i have already taken permission from user to click on "OK" button programetacally.
phil.o 17-Apr-14 3:59am    
I'm not aware of any.
Better change the policy in place (argue with the IT admin if it is not you), or try to, rather than trying to bypass it in a (not so quick) and dirty way.
CHill60 17-Apr-14 5:08am    
"I have already taken permission from user..." ... the permission to do that is not the users to give! It should come from whoever "owns" the domain, and that is unlikely to be the user that sits in front of that PC. However - as I said in my solution I am not aware of anyway of doing this programatically - unless it it is real under-the-covers hacking which no-one here is going to explain to you
GAJERA 24-Apr-14 7:01am    
get the solution thanks ,I have done it programmatically.
SCADirector 10-Nov-15 12:37pm    
GAJERA:

Can you post your solution or PM me with it? Thanks.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900