Quantcast
Viewing all articles
Browse latest Browse all 19267

Re: View Users default printer not always sticking

VBScript logoff

 

Set oShell = CreateObject("WScript.Shell")
strValue = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device"
strPrinter = oShell.RegRead(strValue)

If inStr(UCASE(strPrinter), "V-ITSV-PRINT02") Or inStr(UCASE(strPrinter), "PROD-PRINT02") Then
oShell.Run("reg export ""HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows"" ""%APPDATA%\printdefault.reg"" /y")
End If

oShell.Run("reg export ""HKCU\Printers\Connections"" ""%APPDATA%\print.reg"" /y")

 

 

Batch login script:

 

@echo off

timeout 120 > nul

reg import %APPDATA%\print.reg

reg import %APPDATA%\printdefault.reg


Viewing all articles
Browse latest Browse all 19267

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>