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