Link to home
Start Free TrialLog in
Avatar of SqueezeOJ
SqueezeOJFlag for United States of America

asked on

How to Check Net Use Find LPT2 in DOS Batch File (.bat)?

Hello,

Writing short MS DOS batch (.bat) file for Windows XP and need to test result of NET USE.

Here's the pseudo-code of what I'd like to do...
NET USE | FIND "LPT2" --> Put Result Into LPT2-OK variable
IF LPT2-OK is TRUE
   THEN Issue Command
   ELSE Issue Another Command

Open in new window

What bat code would accomplish this?

Thanks,
Jason
ASKER CERTIFIED SOLUTION
Avatar of Paul Tomasi
Paul Tomasi
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SqueezeOJ

ASKER

Fast. Easy. Complete.
Thanks!
Thank you !! :)