I was trying to use a batch file and DEVCON, but I am not having any success.
I wrote a batch file in to see if DEVCON sees the docking station.
devcon status ACPI\DOCK*| find "running"
ECHO errorlevel: %errorlevel%
IF errorlevel 0 GOTO SUBA
:SUBA
c:\altiview.lnk
c:\HPDigitalImagingMonitor.lnk
:END
Exit
I do get "0" returned when the docking station is not present and "1" returned when it is not. However, in either case the "SUBA" commands are executing. I only want to run SUBA when the docking station is not present.
What am I doing wrong?
Thanks for your help and time.