Guest User

Untitled

a guest
May 19th, 2013
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. For /F "Tokens=1 delims=" %%I In ('reg query "HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionDevices" ^|find /I "WPL"') Do If "%%I"=="Printer WPL-606" Goto :EOF
  2. REM Otherwise Do Stuff
  3.  
  4. Printer WPL-606 REG_SZ winspool,Ne07:
  5.  
  6. For /F "Tokens=1,2 delims= " %%I In ('reg query "HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersionDevices" ^|find /I "WPL"') Do (
  7. If "%%I %%J"=="Printer WPL-606" (
  8. GOTO:EOF
  9. ) ELSE (
  10. REM Otherwise Do Stuff
  11. )
  12. )
  13.  
  14. cscript "C:WINDOWSsystem32prnmngr.vbs" -l -s \localhost | FIND /I "WPL-606"
  15. IF [%errorlevel%] == [0] (
  16. GOTO:EOF
  17. ) ELSE (
  18. REM Otherwise Do Stuff
  19. )
  20.  
  21. For /F "Tokens=1,2 delims=" %%I In ('devcon.exe findall *WPL-606*') Do (
  22. If "%%J"=="PRINTERWPL-606" (
  23. GOTO:EOF
  24. ) ELSE (
  25. REM Otherwise Do Stuff
  26. )
  27. )
Advertisement
Add Comment
Please, Sign In to add comment