Yashied Posted August 28, 2010 Share Posted August 28, 2010 (edited) LAST VERSION - 1.128-Jun-10The program consists of only one executable file (USBProtect.exe), and is intended to lock any removable storage devices, such as Flash Drive, Hard Drive (external), etc. Just run USBProtect and all removable drives will be locked. If you try to open them, you get the "Access is denied" message. If the user's account is not included in the administrators group, the user not be able to unload the process by using Windows Task Manager. In this case, USBProtect can be unloaded only by using the "/u" command line parameter (see below). I must say that USBProtect is designed to work only in Windows Vista/7 (USBResolve, see below, works in any systems).A distinctive feature of USBProtect is that you can create (mark) a "favorites" removable drives. These drives will not be locked by USBProtect. To create the "favorite" drive you have to do the following.Create a text file named "Volume.dat" in the root directory of the required drive, for example "D:Volume.dat".Place in this file a unique identifier which returns the following function. This identifier is based on the serial number of drive's file system, so if you format it, this process must be repeated again.#Include <Crypt.au3> Func _GetVolumeUniqueID($sVolume) Local $Serial = DriveGetSerial($sVolume) If @error Then Return '' EndIf Local $Hash = StringTrimLeft(_Crypt_HashData($Serial, $CALG_MD5), 2) If $Hash Then Return StringMid($Hash, 1, 8) & '-' & StringMid($Hash, 9, 4) & '-' & StringMid($Hash, 13, 4) & '-' & StringMid($Hash, 17, 4) & '-' & StringMid($Hash, 21, 12) Else Return '' EndIf EndFunc ;==>_GetVolumeUniqueIDSet "Hidden" and "Read only" attributes for this file.Now USBProtect will not lock this drive, and you can safely use it while all other drives will be locked. To not do every time this steps, I wrote a small utility USBResolve (inside the archive) which makes all the same but much faster and safer. Just select a drive from the list and click "Change Status" button for lock/unlock its. Naturally, this should be done while USBProtect is not launched, otherwise, drive will not be present in the list, or on another computer. Note, you can unlock only drives that have the FAT32 or NTFS file systems. And lastly, USBProtect does not write any data in the registry, it's does not need them.You can use the following command line parameters:"/c" or "/cd"Locks access to all the internal CD/DVD/BD-ROM devces while the process is in memory."/u" or "/unload"Unloads USBProtect from memory. Supported operating systemsWindows Vista, 7Files to downloadBinaryRedirection to USBProtect_bin.7z, 605 KBUSBProtect_bin.htmlSourceRedirection to USBProtect_source.7z, 125 KBUSBProtect_source.htmlNoteSource code inside the archive is fully functional, but for security reasons I excluded from it a function that is responsible for protecting the process. I think that if someone who written something which really needed a protection of the process, he can independently implement that. Edited December 8, 2013 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
wakillon Posted August 28, 2010 Share Posted August 28, 2010 Good Idea, thanks to share !and for xp users like me, is there another version ? AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
slayerz Posted September 3, 2010 Share Posted September 3, 2010 Really nice example Yashied... especially the exe protection feature. BTW, if you have Unlocker installed, you can actually unlock your USB... but overall, it's a very nice program AUTOIT[sup] I'm lovin' it![/sup] Link to comment Share on other sites More sharing options...
logmein Posted September 5, 2010 Share Posted September 5, 2010 Hmm, it requires Windows Vista that I don't have. Can you develop a version for XP? [font=arial, helvetica, sans-serif][s]Total USB Security 3.0 Beta[/s] | [s]Malware Kill[/s] | Malware Scanner | Screen Hider | Locker | Matrix Generator[s]AUTO-SYNC 1.0 | MD5 Hash Generator | URL Checker | Tube Take [/s]| Random Text[/font] Link to comment Share on other sites More sharing options...
Yashied Posted September 5, 2010 Author Share Posted September 5, 2010 Hmm, it requires Windows Vista that I don't have. Can you develop a version for XP?USBProtect uses the WinAPI functions to lock a devices that will not work properly in Windows XP. The program is designed only for Windows Vista or later. I'm sorry. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
4Eyes Posted September 6, 2010 Share Posted September 6, 2010 Yashied, In relation to your comment "Source code inside the archive is fully functional, but for security reasons, I excluded from it a function that is responsible for protecting the process", I can't help but wonder.... is this 'protection' a method to prevent the process from being 'ProcessClosed' or does it hide the process? Regards, 4Eyes Link to comment Share on other sites More sharing options...
Yashied Posted September 6, 2010 Author Share Posted September 6, 2010 Yashied,In relation to your comment "Source code inside the archive is fully functional, but for security reasons, I excluded from it a function that is responsible for protecting the process", I can't help but wonder....is this 'protection' a method to prevent the process from being 'ProcessClosed' or does it hide the process?Regards,4EyesPrevents a closure process. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted April 27, 2012 Author Share Posted April 27, 2012 Links updated. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Yashied Posted December 8, 2013 Author Share Posted December 8, 2013 Links updated.P.S.If you can't download my programs in other posts please change address:http://yashied.narod2.ru/tohttp://yashied.ru/ My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
Zmy Posted August 27, 2018 Share Posted August 27, 2018 Download link not exist. Link to comment Share on other sites More sharing options...
BrewManNH Posted August 27, 2018 Share Posted August 27, 2018 This thread is 5 years old, not surprised the link is dead. Use Bitlocker to protect your USB drives, very simple to use. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now