Results 1 to 3 of 3

Thread: WebBrowser - Delete cookies etc

  1. #1
    Lively Member
    Join Date
    Jan 10
    Location
    United Kingdom
    Posts
    115

    Post WebBrowser - Delete cookies etc

    VB.Net

    If you're using the default WebBrowser control and would like to clear your Cookies, History, Forms Data etc then the following can do this. If using a button/menu item to perform this then just add one of the following into the button or menu item's click event.

    Code:
    'Temporary Internet Files
    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 8")
    
    'Cookies()
    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 2")
    
    'History()
    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 1")
    
    'Form(Data)
    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 16")
    
    'Passwords()
    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 32")
    
    'Delete(All)
    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 255")
    
    'Delete All – Also delete files and settings stored by add-ons 
    System.Diagnostics.Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 4351")
    Last edited by wearmc; Apr 16th, 2010 at 04:26 AM.
    Regards
    Colin

    If my comments helped please remember to add to my reputation using Rate This Post.

    If your problem has been resolved please mark the thread resolved using the "Mark Thread Resolved" link in thread tools.

    CodeBank Submissions: 1) WebBrowser - Delete cookies etc 2) Import My.Settings from previous build version

  2. #2
    Addicted Member
    Join Date
    Jan 11
    Location
    Memphis, TN
    Posts
    142

    Re: WebBrowser - Delete cookies etc

    I'm just curious if the process id's are still the same since upgrading to visual studio 2010 etc.
    Can anyone find any problems with this code being used with VB2010/Win7 (64bit) while natively running IE8 on their system?
    Dim jennifer As Integer = "coder.vb.net.jalexander"
    got a few learning disabilities: dyslexia & a.d.d...
    doing my best to learn 2010 VB ~ in between class/work. so thanks for your help!

  3. #3
    Lively Member
    Join Date
    Jan 10
    Location
    United Kingdom
    Posts
    115

    Re: WebBrowser - Delete cookies etc

    Hi Jen

    Sorry I can't help you with your question. I'm still running vb2008 on an xp machine. There may be other ways to do the above but I'm not sure. Some of the guys (and gals) on the forum are a lot more advanced than myself so maybe one of them will respond.

    Regards
    Colin
    Regards
    Colin

    If my comments helped please remember to add to my reputation using Rate This Post.

    If your problem has been resolved please mark the thread resolved using the "Mark Thread Resolved" link in thread tools.

    CodeBank Submissions: 1) WebBrowser - Delete cookies etc 2) Import My.Settings from previous build version

Posting Permissions

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