Jan 21st, 2025, 7:44am
Welcome, Guest. Please Login or Register.
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print
   Author  Topic: Script disconnections on log off  (Read 4597 times)
Script disconnections on log off
on: Feb 10th, 2015, 6:12am
Quote Quote  Modify Modify

Hi,
 
Is it possible to script the disconnection of all devices (or a specific one) from a log off script in Windows7?  
 
We use USB over Network in a VMware Horizon View environment to share scanners from the physical PC to the virtual desktop. This method performs far better than using the Connect USB device option on the virtual desktop.
 
We have a problem with staff failing to disconnect the scanners. We used the "Allow connecting when the USB device is occupied by another user." for a while and found that as connections built up we experienced difficulties connecting and application crashes. Refreshing the VDI pool clears the connections, but it would be preferable to disconnect them on log off.
 
Thanks
 
Allan
IP Logged
Re: Script disconnections on log off
Reply #1 on: Feb 10th, 2015, 9:39am
Quote Quote  Modify Modify

Hi !
You can write a script using the USB over Network CLI (http://www.fabulatech.com/usb-over-network-client-help/using-command-line.html) for releasing your usb devices during the log off.
IP Logged

Sergey Jarovski

FabulaTech
===================
http://www.fabulatech.com
Re: Script disconnections on log off
Reply #2 on: Feb 10th, 2015, 10:01am
Quote Quote  Modify Modify

Many thanks for your help, it looks like there are commands available that will do what we need.
IP Logged
Re: Script disconnections on log off
Reply #3 on: Feb 11th, 2015, 5:14am
Quote Quote  Modify Modify

Script for reference should anyone else wish to use it
 
::SH - 10/02/2015 - USB Over Network Disconnect
@echo OFF
cls
 
set drive=C:\Program Files\USB over Network
cd %drive%
 
:start
for /f %%i in ('usbclncmd list') do set VAR=%%i
 
if %VAR% NEQ [] (
 
usbclncmd del %VAR:~6,4%
 
set VAR=
 
call :start
 
)
IP Logged
Pages: 1  Reply Reply  Notify of replies Notify of replies  Print Print

Previous topic | Next topic
Online Talk to our
support team or
sales department.