Rob van der Woude's Scripting Pages
Powered by GeSHi

Source code for getdevdj.bat

(view source code of getdevdj.bat as plain text)

  1. @ECHO OFF
  2. ECHO.
  3.  
  4. IF NOT "%OS%"=="Windows_NT" GOTO Syntax
  5. IF NOT [%1]==[] GOTO Syntax
  6.  
  7. SETLOCAL
  8. SET DJ=
  9. FOR /F "tokens=2 delims=:()" %%A IN ('DEVCON find * ^| FIND /I "hp deskjet"') DO SET DJ=%%A
  10. IF DEFINED DJ (
  11. 	ECHO.%DJ%
  12. ) ELSE (
  13. 	ECHO  No HP DeskJet installed
  14. )
  15. ENDLOCAL
  16. GOTO:EOF
  17.  
  18. :Syntax
  19. ECHO GetDevDJ.bat,  Version 1.00 for Windows NT 4 / 2000 / XP
  20. ECHO Check if a HP DeskJet printer is installed
  21. ECHO.
  22. ECHO Usage:  GETDEVDJ
  23. ECHO.
  24. ECHO Written by Rob van der Woude
  25. ECHO http://www.robvanderwoude.com
  26. ECHO.
  27. ECHO Notes:  This batch file uses Microsoft's (R) DEVCON utility.
  28. ECHO         This utility can be found at http://support.microsoft.com
  29. ECHO         by searching for Q311272 in the English Knowledge Base.
  30. ECHO.
  31. ECHO         The author nor this site are in any way affiliated with Microsoft (R)
  32.  
  33. :End
  34.  

page last modified: 2024-04-16; loaded in 0.0045 seconds