Skip to content
xoocoon edited this page Sep 1, 2019 · 7 revisions

Here are some hints on how you can use usbip-win to enhance the user experience.

Scripting on Windows

If you want to run usbip-win in background instead of an open shell window, you can use https://github.com/stbrenner/SilentCMD by Stephan Brenner. It is a small utility (.exe) which calls a batch file and logs any output to a file.

You may write a Windows batch file which resolves your usbip-host and binds the USB device using usbip-win. Then you can configure your batch file in the silentcmd.exe.config file, along with some logging options. This in enables you to attach your USB device with one doubleclick. You can further customize this solution by renaming the standard .exe file together with the .config file. Put the finishing touches to it by assigning a custom icon in Windows, e.g. Bluray icon for a Blueray player connected via usbip-win.

Energy management

In order to detach a drive before shutting down the computer or for putting it into standby mode, you can use the Windows Task Scheduler.

As triggers, you can use e.g.

  • "On disconnect from user session"
  • "On event". For Standby / Hibernate use: Protocol "Microsoft-Windows-Kernel-Power/Thermal-Operational", source "Microsoft-Windows-Kernel-Power", event ID "42"

As an action you can use e.g.

  • <path>\usbip.exe detach -p 1
  • a custom batch file checking on conditions etc.
Clone this wiki locally