Clear SSL state using vbscript

As part of my project, I have to automate a web application that runs on top of a secure socket level. Thus, I have to clear the SSL status, cache, browsing history using vbscript, after logging out if some account is not working properly. I have written the following code so far, but it does not work correctly.

ieObj.document.execCommand ("ClearAuthenticationCache") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.Namespace(TEMPORARY_INTERNET_FILES) objFSO.DeleteFile (objFolder.Self.Path & "\*.*") ieObj.Quit Set ieObj = Nothing Application.Wait DateAdd("s", 2, Now) 

Just for updating right now I am clearing ssl state with sendkeys,

 Sub ClearSSLState() ' Macro1 Macro Dim oShell Set oShell = CreateObject("Wscript.Shell") oShell.Run ("cmd") Application.Wait DateAdd("s", 1, Now) oShell.AppActivate "C:\SYSROOT\system32\cmd.exe" Application.Wait DateAdd("s", 1, Now) oShell.SendKeys "inetcpl.cpl" oShell.SendKeys "{enter}" oShell.AppActivate "Internet Properties" Application.Wait DateAdd("s", 1, Now) oShell.SendKeys "^{TAB 3}" oShell.SendKeys "{Tab}" oShell.SendKeys "{enter}" oShell.SendKeys "{enter}" oShell.SendKeys "{Tab 6}" oShell.SendKeys "{enter}" Application.Wait DateAdd("s", 1, Now) oShell.AppActivate "C:\SYSROOT\system32\cmd.exe" oShell.SendKeys "exit" oShell.SendKeys "{enter}" End Sub 

It would be very helpful if someone would suggest any option to clear ssl state using vbscript.

Thank you very much:)

+4
source share
1 answer

When configuring the control panel action with Process Monitor (great utility, BTW), it looks like the following command is executed when the Clear SSL status button is pressed:

 "C:\Windows\system32\rundll32.exe" "C:\Windows\system32\WININET.dll",DispatchAPICall 3 
+4
source

Source: https://habr.com/ru/post/1444111/


All Articles