Sign in to follow this  
Followers 0
daslick

internet explorer history

15 posts in this topic

I tried using DirRemove(@UserProfileDir & "Local Settings\History\History.IE5", 1)

but its not working.

I got it to remove the cookies... the history is a little harder because it is integrated in explorer.

THANKs!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

The solution is simple. There is a BLANK in the path. You must put the path in extra '"'(quotes). Or use FileGetShortName

DirRemove(@UserProfileDir & '"Local Settings\History\History.IE5"', 1)

Johannes

Edited by jlorenz1

Johannes LorenzBensheim, Germanyjlorenz1@web.de[post="12602"]Highlightning AutoIt Syntax in Notepad++ - Just copy in your Profile/application data/notepad++[/post]

Share this post


Link to post
Share on other sites

I didn't notice the syntax error, but that is not the problem. Clearing that folder isn't deleting the history. The history file is in DirRemove(@UserProfileDir & '"\History"', 1) but cannot be deleted because it is a windows system folder.

Share this post


Link to post
Share on other sites

I have no idea if this will work, but you could try:

FileSetAttrib (FileGetShortName(@UserProfileDir & "Local Settings\History\History.IE5"), "-S", 1)

THEN try to DirRemove it.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Removing that directory is not a problem or what i need... I figured out that I need to clear all the history files like this.....

FileDelete(@UserProfileDir & "\History\*.*")

but they cannot be deleted like this because they are not standard files or something....

Browse to that folder and look. Im not sure how to go about removing them without opening the folder and hitting delete :P

Share this post


Link to post
Share on other sites

you said it wouldnt work because its a system folder. I just told you how to make it not a system folder anymore.


The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

That didnt work becuase it is a 'windows system folder' it cannot be deleted.

Open your user folder and try to delete the history folder... it wont let you. windows system folder protection

Share this post


Link to post
Share on other sites

Did you try deleting *.*? You say they are non-standard, but how do you know? Maybe the folder doesn't really exist and is just a namespace?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

If you guys took the time to actually look at what you were doing, it wouldn't be "I can't" or "Did you try".

@theguy

FileSetAttrib (FileGetShortName(@UserProfileDir & "Local Settings\History\History.IE5"), "-S", 1)

Should be:

FileSetAttrib (FileGetShortName(@UserProfileDir & "\Local Settings\History\History.IE5"), "-S", 1)

@daslick:

You're right: FileDelete(@UserProfileDir & "\History\*.*") isn't going to work, because there is no file there.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Yes i tried deleting *.*.

Open the folder and you will see... you cannot even right click and get the real file name...

Browse to C:\Documents and Settings\Username-here and try to delete history.

I have no clue how to do it, but is there a way to simulate using the delete button on the files within the folder? maybe like a shelldelete?

Share this post


Link to post
Share on other sites

Is there a way I could run this hidden?

RunDll32.exe shell32.dll,Control_RunDLL inetcpl.cpl (this command opens internet explorer internet properties)

then send keys or data or something to that hidden window and clear history that way?

Share this post


Link to post
Share on other sites

@theguy

FileSetAttrib (FileGetShortName(@UserProfileDir & "Local Settings\History\History.IE5"), "-S", 1)

Should be:

FileSetAttrib (FileGetShortName(@UserProfileDir & "\Local Settings\History\History.IE5"), "-S", 1)

Ah. I didn't notice that. I just copied what the OP had in the first post.

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Share this post


Link to post
Share on other sites

Here, you can translate this over to AutoIt:

http://vbnet.mvps.org/index.html?code/internet/index.html


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

Thanks I'll take a look and post back if I can translate it....

EDIT: Nevermind. I do not know VB.net and couldn't even begin to understand that.

If anyone knows VB.net and would like to, I would really appreciate it. http://vbnet.mvps.org/index.html?code/internet/index.html

Here is the junky code I have written in the mean time to clear history.

Func _clearhistory()
    Run("RunDll32.exe shell32.dll,Control_RunDLL inetcpl.cpl")
    WinWaitActive("Internet Properties","",3)
    if not WinActive("Internet Properties") then Return
            Send("{Tab 3}")
            Send("{Enter}")
            Send("{Enter}")
                WinWaitActive("Internet Properties","",3)
                if not WinActive("Internet Properties") then Return
        Send("{Tab 4}")
        Send("{Enter}")
        Send("{left}")
        Send("{Enter}")
            WinWaitActive("Internet Properties","",10)
            if not WinActive("Internet Properties") then Return
        Send("{Tab 7}")
        Send("{Right 3}")
        Send("{Tab 5}")
        Send("{Enter}")
        Send("{Tab 4}")
        Send("{Enter 2}")
        Send("{Tab}")
        Send("{Enter 2}")
    WinClose("AutoComplete Settings")
    WinClose("Internet Properties")
EndFunc
Edited by daslick

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

Sorry for the double post.... here is a much more stable version of the above.

Func _clearhistory()
    $busy = "yes"
    Opt("WinTitleMatchMode", 4)
    ToolTip("Please wait while your browsing history is being cleared...",MouseGetPos(0),MouseGetPos(1),"Virulence Browser")
    Run("RunDll32.exe shell32.dll,Control_RunDLL inetcpl.cpl")
    WinWait("Internet Properties","",3)
    $historyhandle = WinGetHandle("Internet Properties")
    ControlClick($historyhandle, "", 627)
        ControlClick(WinGetHandle("Delete Cookies"), "", 1)
    WinWait($historyhandle, "", 4)
        ControlClick($historyhandle, "", 624)
        ControlCommand(WinGetHandle("Delete Files"), "", 1449, "Check")
        ControlClick(WinGetHandle("Delete Files"), "", 1)
        ControlClick($historyhandle, "", 1489)
        ControlClick(WinGetHandle("Internet Options"), "Are you sure you want to delete your history of visted websites?", 6)
        ControlSend($historyhandle, "", 12320, "{Right 3}")
        sleep(550)
        ControlClick($historyhandle, "", 321)
        WinWait("AutoComplete Settings", "", 2)
                    ControlCommand ( "AutoComplete Settings", "", 756, "Check")
                    ControlCommand ( "AutoComplete Settings", "", 757, "Check")
                    ControlCommand ( "AutoComplete Settings", "", 759, "Check")
                    ControlCommand ( "AutoComplete Settings", "", 761, "Check")
        ControlClick(WinGetHandle("AutoComplete Settings"), "", 1)
        WinWait($historyhandle, "", 2)
        WinKill($historyhandle)
    ToolTip("")
    $busy = "no"
    EndFunc
Edited by daslick

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0