Client Authentication

  • Thread starter Thread starter skowse
  • Start date Start date
S

skowse

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
 
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
 
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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top