Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For /F "Tokens=1 delims=" %%I In ('reg query "HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionDevices" ^|find /I "WPL"') Do If "%%I"=="Printer WPL-606" Goto :EOF
- REM Otherwise Do Stuff
- Printer WPL-606 REG_SZ winspool,Ne07:
- For /F "Tokens=1,2 delims= " %%I In ('reg query "HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionDevices" ^|find /I "WPL"') Do (
- If "%%I %%J"=="Printer WPL-606" (
- GOTO:EOF
- ) ELSE (
- REM Otherwise Do Stuff
- )
- )
- cscript "C:WINDOWSsystem32prnmngr.vbs" -l -s \localhost | FIND /I "WPL-606"
- IF [%errorlevel%] == [0] (
- GOTO:EOF
- ) ELSE (
- REM Otherwise Do Stuff
- )
- For /F "Tokens=1,2 delims=" %%I In ('devcon.exe findall *WPL-606*') Do (
- If "%%J"=="PRINTERWPL-606" (
- GOTO:EOF
- ) ELSE (
- REM Otherwise Do Stuff
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment