Command line force stop

Post Reply
Max.A
Posts: 9
Joined: May 30th, 2017, 9:14 am

Command line force stop

Post by Max.A »

Hello,

Is there the way to make device force stop via command line like with GUI?

Regards, Max
User avatar
Igor
Developer
Posts: 602
Joined: Nov 1st, 2007, 12:44 pm
Location: Saint Petersburg
Contact:

Re: Command line force stop

Post by Igor »

Max.A.,
Yes, it's possible, see forcedstop command line option: command line manual
Max.A
Posts: 9
Joined: May 30th, 2017, 9:14 am

Re: Command line force stop

Post by Max.A »

Thanks for quick reply, but I found the situation when even forcedreturn cannot help to return external USB drive after forcedstop, just the off/on.

Image

Do you know what do with this?
User avatar
Igor
Developer
Posts: 602
Joined: Nov 1st, 2007, 12:44 pm
Location: Saint Petersburg
Contact:

Re: Command line force stop

Post by Igor »

Max.A,
Initially you've asked about forced stop. Forced return may not work in this version under some circumstances: when you have two or more drives connected to the same USB hub (we call these drives as "neighbor devices").

I'll try to explain what caused the issue and how to workaround it. Suppose you have two drives connected to the same USB hub: X: and Z: and you stopped the drive X:. When you reactivate the drive X: the program restarts the whole USB hub to do the intended action. To restart the USB hub it's needed to disconnect all connections to the devices connected to the hub otherwise the restart is not possible. The program attempts to disconnect the file connections from the drive Z: but sometimes it's not able to do this (when there are some low level system connections) therefore it failed to revert the drive X:. In future we will solve the issue by adding some additional steps to unlock neighbor devices, but at the moment the only way to have guaranteed device return is to connect disk devices to different USB hubs. Usually USB ports in the PC are served by two or more USB hubs, you can check which hub is served the port by connecting the device to different ports and see ParentDevicePnPName parameter in the Technical Parameters (the Device Properties -> Technical Parameters link in the right bottom corner).
ronaldscact
Posts: 2
Joined: Apr 11th, 2019, 4:17 am
Location: Turkey
Contact:

Command line force stop

Post by ronaldscact »

Using the GUI I can always return my USB HDD without problems, however using the command line gives meCannot return XYZ USB Device <ntfs mountpoint>
device back right now Some processes might have opened files on this device nei
ghbours at USB-hub. Stop them and try to stop again.
Use usr wholocks ... command to find out these processes.
User avatar
Igor
Developer
Posts: 602
Joined: Nov 1st, 2007, 12:44 pm
Location: Saint Petersburg
Contact:

Re: Command line force stop

Post by Igor »

Hi ronaldscact,
What version of USB Safely Remove you are using (to see it, right click to the program icon in the system tray, choose Help -> About program)? What certain command you use for return?
Post Reply