(view source code of defprnnt.bat as plain text)
@ECHO OFF
REGEDIT /E %TEMP%.\DEFPRINT.REG HKEY_CURRENT_USER\Printers\Settings
FOR /F "TOKENS=1,2* DELIMS==" %%A IN (%TEMP%.\DEFPRINT.REG) DO CALL :Display %%A
DEL %TEMP%.\DEFPRINT.REG
ECHO.
ECHO Default Printer: %DEFPRINT:\\=\%
GOTO:EOF
:Display
SET LINE=%1
FOR %%A IN (%LINE:"= %) DO IF NOT %LINE%==%%A SET DEFPRINT=%%A
GOTO:EOF
page last modified: 2024-04-16; loaded in 0.0050 seconds