WebBrowser - Delete cookies etc-VBForums
Results 1 to 3 of 3

Thread: WebBrowser - Delete cookies etc

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2010
    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 jalexander's Avatar
    Join Date
    Jan 2011
    Location
    Memphis, TN
    Posts
    160

    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 jenn as geek = true
    Learning ~ Visual Basic 2010 ~ in free time between college/work -
    currently looking for a 'programming buddy' / 'coder friend' / and or 'mentor'. p.m. me if you
    have ANY free time AT ALL I'm like 33% of a novice level ~ willing 2 listen/learn +
    i am totally super motivated & promise to make an effffin amazing protege!!! #swag

    | -_-_- -_-_- |
    ...W.T..F!?.....
    ||| Matter on the atomic/quantum level isn't solid or even matter at all. It can also exist in at least 2 places simultaneously (demonstrated in lab). It's position can only be established when it's actually observed. If we turn our back on it... it goes back to a wave form. History show's that every previous generation (since the beginning of time) got almost everything wrong. Then it might very well stand to reason that up is down & right can be wrong. Admit it.. our combined perception of reality is just that, we know absolutely nothing of actual reality & to think we do is simply subscribing to a "ignorance is bliss" mantra |||

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2010
    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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.