Sign in to follow this  
Followers 0
am632

Remove directory with unknown/random name

11 posts in this topic

Hi,

Im wanting to make a tool that removes a specific scarware application but im stuck and dont know how to continue, i think a search should go in here somewhere but i dont know how to do that. This is what i am trying to automate... http://www.2-spyware.com/remove-security-suite.html

Here is a snippet of the code im using.

If FileExists(@UserProfileDir & "\Local Settings\Application Data" & "\*\*shdw.exe") Then
    DirRemove(@UserProfileDir & "\Local Settings\Application Data" & "\*\*shdw.exe", 1)
EndIf

also, how would i go about removing a registry key with the same filename which was random such as "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run "[random]"

Thanks

Share this post


Link to post
Share on other sites



Start with The function "FileFindFirstFile" in autoit help ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

thanks, ill hav a look at this

Share this post


Link to post
Share on other sites

ok, I've looked at the FileFindFirstFile and have come up with this....

;search for security suite exe
$search = FileFindFirstFile(@UserProfileDir & "\Local Settings\Application Data\*\*shdw.exe")

; Check if the search was successful
If $search = -1 Then
    MsgBox(0, "Error", "Security Suite was not found on the system")
    Exit
EndIf

While 1
    $file = FileFindNextFile($search)
    If @error Then ExitLoop

    MsgBox(4096, "File:", $file)
WEnd

; Close the search handle
FileClose($search)

when ever i run the program I get the "error - security suite was not found on the system" even if i have a folder named 'ramdomblabla' in the local settings\application data folder with an exe named blashdw.exe?

any ideas?

thanks

Share this post


Link to post
Share on other sites

Try _FileListToArray? ;)


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Try _FileListToArray? ;)

Thanks for this. I've had a quick look at this but im not sure how to use this for my problem with the folder and file name being random. could you possibly elaborate please?

thanks for the help guys

Share this post


Link to post
Share on other sites

AnyOne Pleaseee?

Share this post


Link to post
Share on other sites

Thankyou I'll have alook at this

Share this post


Link to post
Share on other sites

I checked out the autoit 123 but this jus seems to be the same as whats in the help files but doesnt explain what i need to know, thanks anyway tho.

anyone else know how to do this?

thanks

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