Jump to content

Autoit To Run Virus Scan Prog When Removable Device Connected


Recommended Posts

I want to use autoIt to run a virus scan prog when a removeable device is inserted. So basicly i need a wait until drive exists script.

Any ideas?

i am pretty sure this has been covered before, (meaning search may give you better response than mine) you should be able to use drivestatus() or drivegetlabel() to check either if the removable drive is ready, or to check if any of the drives showing on the system are your removable drive. toss that in a loop with a condition to call your other function if drive is found/ready.
Link to comment
Share on other sites

Maybe this will help to start:

CODE

do

$listDrives=DriveGetDrive( "REMOVABLE" )

If NOT @error Then

$chk=True

Else

$chk=False

EndIf

until $chk=True

msgbox (0,"Removable Device dedect","Removable Device dedect")

;Start what you want

Edited by Micha1405
Link to comment
Share on other sites

  • 1 month later...

Hi i know its been a long time since i started the thread but i looked at it and thought hmm"HELP" but ive been pretty busy so i left it.

Can you help me with implementing this script?

Link to comment
Share on other sites

Hi,

just a question. Why do you want to run a prog. at all time just to start a scan when USB-Stick is plugged in?

Normally you have an realtime scanner running. How often do you plug something? I think scripting the start scan from drive .... is better.

Just a thought.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

Well im runnig AVG free and its a shared computer into which lots of different memory sticks get shoved in. I could ask every1 to scan their flash drives when they plug them in but most wouldnt bother

Link to comment
Share on other sites

Well im runnig AVG free and its a shared computer into which lots of different memory sticks get shoved in. I could ask every1 to scan their flash drives when they plug them in but most wouldnt bother

HI,

wouldn't it be better to scan the hdd of the pc every lets say day at 12 o'clock than scanning the usb-drives? You want to protect the pc and not the USB-drives, right?

Normally the scanner should notice itself if something changes, so you do not have to do a full scan.

Just my 2 cents.

So long,

Meg

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...