IMPROVED: Howto: Safely remove USB Drive from batch file | Portable. Apps. com. EDIT 3: Much better version posted later on at http: //portableapps. EDIT: Updated scripts, fully working with autorun and no dos boxes are in my reply below. EDIT 2: This doesn't work from a limited account, but doesn't cause any problems, it just won't automatically unmount if you aren't an administrator. I don't know if this has been discussed before, I'm kind of new here, but I found a nice little way to safely remove your USB drive, without navagating through the menus in windows XP. AFAIK this will only work on Win. XP, not 9. 5/9. 8, though I haven't tested them. Credits to http: //ask- leo. I found part of this solution. First, get devcon from http: //support. A Microsoft Outlook.PST file can reside anywhere you want, and a removable USB drive is a perfectly legitimate location for it. Even though Microsoft doesn't. This is a command line device management program. Extract it somewhere, and run: devcon status *This will list all the devices on your computer. What you are looking for is usually the USB Mass Storage Device. It should be whatever the TOP line is on the screen to safely remove hardware. In my case I get this: USB\VID_0. PID_7. 11. 3\0. 00. EXAMPLE: Autorun.inf Files Unblocked and Blocked NOTE: This example is with the icon key. Here's How:1. To Completely Block and Disable Autorun.inf Files.Windows Thread, Stopping.exe files from being run from a USB stick in Technical; I think this has been covered many times but i can't seem to find older posts when i. A while back we published an article about disabling USB drives. It included a little program that would make the registry change for you. We took it one step further. These memory devices will appear to work until you put too many files on them (e.g. in the case above, if you put more than 2GB of files on it.). Name: USB Mass Storage Device. Driver is running. Now see if you can remove it with this line: devcon remove "USB\VID_0. PID_7. 11. 3"(note the quotes around the device string, and the last section cut off. Not sure why but it only works without that part)Now you need to make two little batch files: startmenu. USB\VID_0. 78. 1& PID_7. How this works: You run startmenu. PStart pops up. Once you close PStart, it copies devcon and the remove. It switches to the c: drive so that it isn't holding the flash drive open, uses ping to wait 5 seconds, then runs remove. Remove. bat dismounts the flash drive, then delete's itself, leaving no traces on the system. It seems that it won't unmount the drive if there are any files still open on it, which is a good thing IMHO. ![]() But if your programs crash or something it may not unmount automatically. I'm now trying to figure out a way to make the dos window not show up. I'll post here if I figure that out. All about 'Fake' SD cards and USB Flash drives to check it for viruses). Note: Some people have found that the Fake. Flash. Test Quick Size Test fails all the devices that they test. This seems to be due to something that has been installed in Windows (e. ![]() ![]() Anti- Malware or Anti- Virus software or perhaps a driver). If you reboot Windows in. ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
October 2016
Categories |