+ Reply to Thread
Results 1 to 3 of 3

Client Authentication

  1. #1

    Client Authentication

    I have a certificate on my machine that allows me to download files
    from some site. The site (or certificate) requires me to say ok to
    client authentication when the window pops up and then my code can
    proceed. I want to be able to automate the clicking on the OK in the
    client authentication window, any suggestions?

    Thanks


  2. #2
    Jim Thomlinson
    Guest

    RE: Client Authentication

    You can give this a try... It creates an external VB script to send a key.

    Sub AnswerQuestion()
    Dim fso As FileSystemObject
    Dim fsoFile As Variant

    Set fso = New FileSystemObject
    Set fsoFile = fso.CreateTextFile("C:\Bypass.vbs")

    fsoFile.writeline "Set fso = Createobject(""Wscript.shell"")"
    fsoFile.writeline "wscript.sleep 1000" 'Adjust time
    fsoFile.writeline "fso.sendkeys ""y"", true"
    fsoFile.Close

    End Sub

    Sub test()
    Dim wshShell As Variant

    'Create Script to answer question
    Call AnswerQuestion

    'Run the script to answer the Yes No question
    Set wshShell = CreateObject("Wscript.Shell")
    wshShell.Run ("C:\Bypass.vbs")
    MsgBox "Tada", vbYesNo

    End Sub

    --
    HTH...

    Jim Thomlinson


    "[email protected]" wrote:

    > I have a certificate on my machine that allows me to download files
    > from some site. The site (or certificate) requires me to say ok to
    > client authentication when the window pops up and then my code can
    > proceed. I want to be able to automate the clicking on the OK in the
    > client authentication window, any suggestions?
    >
    > Thanks
    >
    >


  3. #3
    Jim Thomlinson
    Guest

    RE: Client Authentication

    Sorry with my answer just given you need to reference the code to "Microsoft
    Scripting Runtime". In the VBE select Tools -> References and check
    "Microsoft Scripting Runtime"
    --
    HTH...

    Jim Thomlinson


    "[email protected]" wrote:

    > I have a certificate on my machine that allows me to download files
    > from some site. The site (or certificate) requires me to say ok to
    > client authentication when the window pops up and then my code can
    > proceed. I want to be able to automate the clicking on the OK in the
    > client authentication window, any suggestions?
    >
    > Thanks
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1