(view source code of getdevdj.bat as plain text)
@ECHO OFF
ECHO.
IF NOT "%OS%"=="Windows_NT" GOTO Syntax
IF NOT [%1]==[] GOTO Syntax
SETLOCAL
SET DJ=
FOR /F "tokens=2 delims=:()" %%A IN ('DEVCON find * ^| FIND /I "hp deskjet"') DO SET DJ=%%A
IF DEFINED DJ (
ECHO.%DJ%
) ELSE (
ECHO No HP DeskJet installed
)
ENDLOCAL
GOTO:EOF
:Syntax
ECHO GetDevDJ.bat, Version 1.00 for Windows NT 4 / 2000 / XP
ECHO Check if a HP DeskJet printer is installed
ECHO.
ECHO Usage: GETDEVDJ
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
ECHO.
ECHO Notes: This batch file uses Microsoft's (R) DEVCON utility.
ECHO This utility can be found at http://support.microsoft.com
ECHO by searching for Q311272 in the English Knowledge Base.
ECHO.
ECHO The author nor this site are in any way affiliated with Microsoft (R)
:End
page last modified: 2024-04-16; loaded in 0.0045 seconds