USB "In Use" and Eject Context Menu

Ya, you're probably right.
If this guy is working with usb's in his full time job all day, it might be worth it to run some beta tests with backed up and non-critical usb's. Have them set to quick removal and use it for a while without ejecting to see how many times it actually happens. But one time it does happen wrecks all the benefit of the time saved, especially if it's for business use.

When I first had this issue I learned of putting a comand on a button to pass to the NirSoft's NirCmd tool to safely eject the usb. Works good, until I changed drive paths or something and the button stopped working so I just gave up. I'll just frikkin USE THE TASKBAR then.

This is my take:


<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="#ffffff" type="three_button">
	<label>Eject</label>
	<icon1>/onedrive/Icons/streamline-cyber-color--usb-flash-drive(1).png,0</icon1>
	<button backcol="none" display="both" icon_size="large" label_pos="right" textcol="#ffffff">
		<label>Eject</label>
		<icon1>/onedrive/Icons/streamline-cyber-color--usb-flash-drive(1).png,0</icon1>
		<function type="normal">
			<instruction>Go TABNAME &quot;%R&quot; EJECT</instruction>
			<instruction>@label:Root(source)</instruction>
		</function>
	</button>
	<button backcol="none" display="label" icon_size="large" label_pos="right" textcol="none">
		<label>Locks?</label>
		<icon1>#newcommand</icon1>
		<function type="normal">
			<instruction> %UserProfile%\AppData\Roaming\ShowWhatProcessLocksFile\ShowWhatProcessLocksFile.exe {sourcepath|\}</instruction>
		</function>
	</button>
</button>

Left click ejects the root of the current directory, so if you have the usb open, clicking it dismounts it.
right click uses @polargoose showwhatlocksthisfile, to check any processes preventing dismount.

1 Like