Jump to content

Monitor removable USB Drive?


Seagul
 Share

Recommended Posts

I'm using my usb drive I've put few important files Portable FireFox, Portable Miranda IM, Autoruns, and Process Explorer. Now I use a program called PStart to have a nice menu with the programs on my drive.

I need a script that launches with Pstart "it has option to autorun" that will sleep uintil my usb drive unplugs then have it kill the program.

Link to comment
Share on other sites

You could use something like this:

http://www.autoitscript.com/autoit3/docs/f...iveGetDrive.htm

To determine the number of drives on the Computer, and if there is more(or less) than there normally are, you can make your program do whatever you want it to do.

I might get my feet wet if I understood what you wanted this to do a little better.

Link to comment
Share on other sites

Well you can run PStart which is like a menu for usb drive which can autorun when you plug it in. But when you unplug it is still running on computer. I was playing with driveget for few minutes, but I gotta run to the gym ill try figure it out little bit later. :whistle:

Link to comment
Share on other sites

Well you can run PStart which is like a menu for usb drive which can autorun when you plug it in. But when you unplug it is still running on computer. I was playing with driveget for few minutes, but I gotta run to the gym ill try figure it out little bit later. :whistle:

Oh i get it.

Well, lets pretend you have only one removable drive plugged in at any one time.

Do
    $Drives = DriveGetDrive("REMOVABLE")
    If $Drives[0] = 0 Then;change if you have any more removable drives
        ProcessClose("PStart.exe");Change for process name
    EndIf
Until $Drives[0] = 0 ;This too for more removable Drives
Exit
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...