none
How to click on legal notice dialog box programmatically? RRS feed

  • Question

  • 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\LegalNoticeText .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?

    I am follow the below Process.

    1)Create Window service.

    2)Service will start before log on .

    3) Call below code for click OK button

    SendKeys.SendWait("{TAB}");

    SendKeys.SendWait("{ENTER}");

    Best,

    Mahen






    • Edited by GMahen Saturday, April 19, 2014 10:12 AM Update
    Thursday, April 10, 2014 11:06 AM

All replies

  • Thanks your reply ,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.
    • Edited by GMahen Thursday, April 17, 2014 6:42 AM Add more comment
    Thursday, April 17, 2014 6:37 AM
  • I have try with below code but it couldn't work. I also set manuly focus on this "OK" but it has same behavior.

     SendKeys.SendWait("{TAB}");

     SendKeys.SendWait("{ENTER}");

    Friday, April 18, 2014 10:28 AM
  • Thanks ,I have done it programmatically.
    • Proposed as answer by Pavel A Wednesday, April 30, 2014 12:33 AM
    Thursday, April 24, 2014 11:04 AM
  • How did you manage to do that GMahen? Appreciate if you could shed some light on the workaround
    Tuesday, March 27, 2018 11:05 AM