LockDismount is a small tool that does only one thing (or two to be exactly). It locks and dismounts every volume of a physical drive (HD or UFD for example). That's it!
So what is that good for?
Microsoft changed the way programs can directly write to physical drives in Windows Vista and later.
More technical background informations about this new 'feature' (or restriction) can be found here: http://msdn.microsof...y/ff551353.aspx
Unfortunately some older (but still good and useful) programs are not compatible with this new restriction and stopped working. You will usually see an "Access Denied" error message when they try to write to .PhysicalDriveX.
This is where LockDismount can help. By locking and dismounting all volumes it will allow some of these older programs to work again.
How to use it?
It's simple. Select the Drive you want to lock and press 'Lock it!'. Now open the 'older program' and let it perform the task that usually gave you the access denied error message. When done, unlock the drive again. That's all.
The only important thing is that every volumes gets successfully locked and that you keep them locked until the other program is done.
Please note that you can not lock your system drive or any drive that holds a pagefile!
The idea for this little tool was born here:
http://www.boot-land...?...st&p=108122 by Wonko
So you know who you have to blame for it
How to use the Command Line Interface?
LockDismount will open in GUI mode if you start it without any command line parameters. If one or more parameters are given, it starts in CLI mode.
Batch script example (including Wonko's modifications):
@ECHO OFF lockdismount -lock 4 someapp.exe -someaction .PhysicalDrive4 IF %ERRORLEVEL% EQU 0 ECHO Operation succeeded!&GOTO :EOF IF ERRORLEVEL 999 GOTO :NODRV IF ERRORLEVEL 998 GOTO :LOCKFAIL IF ERRORLEVEL 997 GOTO :EXECFAIL IF NOT ERRORLEVEL 0 GOTO :CMDFAIL GOTO :EOF :NODRV echo Drive #4 doesn't exist! GOTO :EOF :LOCKFAIL ECHO Failed to lock/dismount volumes! GOTO :EOF :EXECFAIL ECHO Failed to execute external command! GOTO :EOF :CMDFAIL ECHO External command was executed but ended with an error! GOTO :EOF
Programs tested so far:
Windows 7:
- RoadKil's Disk Image v1.6
- dsfi (part of the dsfok package)
- Flashnul
Windows Server 2008 R2:
- VMware Workstation 7.11
Windows Vista:
- still looking for testers
Changes:
v0.3.0.0:
- added force dismount option
- added command line interface
Download: LockDismount v0.3.0.0