Unique .Bat Inquiry

A client we support every now and again will need the VirtualHere client restarted on the server so that it scans and picks up USB devices that the client may have unplugged at some point. They're not very tech savy, so instead of having them end the VirtualHere client in task manager and relaunching, I wanted to try and create a simple .bat file that would end the VirtualHere client and relaunch it with one click. I'm new to .bat file creation, but I've been able to successfully create a simple one that kills and relaunches notepad or a cmd window. For some reason, VirtualHere won't abide by the same rules. Can't even get VirtualHere to stop with the first line, so I've no idea if the second line even works yet. Here's the code:

@echo off

TASKKILL /F /IM vhui64.exe

START C:\Downloads\vhui64.exe

Any thoughts?

#2

You must use the client api to stop the client

@echo off
vhui64.exe -t "EXIT"
START c:\Downloads\vhui64.exe