Print server failover with Windows 2003 standard?

Electronic Punk

Staff member
Political Access
2 Dec 2001
We are looking at a huge upgrade that will see all of our Windows 2000 regional servers replaced with two Windows 2003 R2 servers.

Any share that existed will be converted to a DFS share -> users, groups, profiles (although they are being retired), remote installs, application installs, source, wsus (from parent hq), sophos (from parent hq)

Other software like APC Powerchute will be installed on all the servers regardless and I will have Backupexec installed on one with the source available on the other.

Basically I am looking at total redundancy, the one thing I may have overlooked is printers. I did a little research and basically I would seem to have two solutions:

- Print clustering. ( ) But basically that would require a much more costly version of Windows so I don't really like that idea.
- Installing each network printer on each server and making them available twice.

The second is obviously pretty easy to do for me, but not for the users, especially with the onset of DFS I was hoping for a better option.

Any ideas?
Last edited:
Have you ever configured/managed a cluster? I only have experience with setting up and managing an Exchange cluster. With that said it does not make the resources available twice.

Furthermore, you need Enterprise to use clustering.
Well thats the thing, no way I can justify 40-50 copies of Enterprise server just to allow printer sharing redundancy.
Couldn't you do print pooling or whatever it's called?
Not sure how that works so will google it tomorrow.

Reading up on how to modify .msc files on a domain level now.

Really want services.msc to be standard rather extended by default, but don't want to modify it on every single server.
That sounds more like print device failover where print jobs will go to either of several printers.

I am looking for someone to send a job out to a printer on DOMAIN\HP Laserjet 5000 and it will be sent to either available server and deal with it intelligently.

It really depends how the pooling works, if it works like DOMAIN\Printerpool1 and that pool contains the same print device with two different print drivers on each servers and it can intelligently tell if one of those is unavailable then it might work, but that sounds like clustering.

I will check it out anyway and see if it can do it.

Worst comes to worst then I will have to either not have a server randomly die (which never really happens anyway) and having both servers offer all print devices but that could be confusing for the users.
Do you have a problem that has you looking into doing this? Is the server unavailable for some reason or another? Is printing slow?

If you're looking into a print server cluster then I would assume all it would be doing it handling print jobs. Granted, I don't know how many users you support but I find it odd that printing wouldn't work with one server in place, especially if that's all this server is doing.

So yeah, what's the problem?
No basically in each region at the moment we are have a DC and an exchange server.
Later this year and I suspect a good chunk of next year we will be upgrading those to R2 and using DFS to replicate the user data.

I am basically trying to minimise the disruption if we want to take one of those servers offline for any period of time.

RecentlyI had to do two days work on a file server backup because I wanted to reboot the other one (WMI was fubarred and the file system was churning itself up about it).

Basically its all about redundancy and minimising what we have to do when a server is offline so I can focus on fixing it rather than creating workarounds for existing services.

We are taking all we can into consideration, both servers will be DCs, they will have a DHCP superscope, DNS, DFS shares and everything else possible considered. Enterprise server however is just not a feasible option.

If a server goes down a key service is unavailable then I get two hours and then the fines start.
Somewhat related to the fact you have a DC and Exchange server - You should go Exchange 2007 and clustering. Heard something how MS is down to like less than 10 around the globe, from like 200 or something before :eek:
Exactly, those regional exchange servers are being retired.
But we sadly won't be going to exchange 2007 at this time.
I think I have a solution to your problem.

Not wanting to spend money on Clustered servers, or wanting duplicate printers of course.

Windows xp creates a registry entry for each printer.

You will see the server name in the key, as well as a Reg_SZ in the key called server.

Change both of these from the old server name to the new. although, in my tests, you need to only change the key, not the reg_sz. not sure how this will work if a server is probably just change both. You don't even need to restart the print spool, or reboot. As soon as the registry entry is changed, the clients printer points to the new server.

Basically, (i haven't developed a script for this yet).
You need a script that a client could just run that would

Dim sOldPrintServer
Dim sNewPrintServer
sOldPrintServer = "PS1"
sNewPrintServer = "PS2"

For each item in Printers where the string equals sOldPrintServer Change to sNewPrintServer


That's it. Then, when you are back up and running properly, you can just push this out via login script, so the users don't have to be bothered running another one.

Hope that helps for what you are looking for.
jbaddock this is excellent advice except my users don't have admin rights(and so cannot edit registry)...i think we can just have run the script under the user logged in and it will work, but it may not, I'll test it out and see....
How are you deploying the printers to the users?
Put a ping test into the vbs and if ping fails the script changes the servername variable.
They just search the directory and add the one they want at the moment (highly complicated :p)
guess i can't attach a file to this post, but i'll include the script that i managed to get working that accomplishes this.
It will ping your primary print server, and if no response, it will change the required reg keys for that logged in user to change existing printer connections for non working print server to alternate print server. It will also grab the current default printer, and set the changed print server's printer to be the new default printer(you lose your default printer when you change the server connection). I tested this and its working for even nonadmin users. A good tool to use to copy print drivers from one server to another is the windows print migrate utility.

please post feedback.


' Author: Isaac G
' Date: 4/29/2008
' Script to update users installed printers to
' use secondary print server

Option Explicit

Dim PF, StrHostPrintsrv1
Set PF = New PrinterFailover

	If Ping(StrHostPrintsrv1) = False Then
	End If	
Public Function Ping(strHost)

    		Dim objPing, objRetStatus

    		set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
      		("select * from Win32_PingStatus where address = '" & strHost & "'")

    		for each objRetStatus in objPing
        		if IsNull(objRetStatus.StatusCode) or objRetStatus.StatusCode<>0 then
    			Ping = False
            		'WScript.Echo "Status code is " & objRetStatus.StatusCode
            		Ping = True
            		'Wscript.Echo "Bytes = " & vbTab & objRetStatus.BufferSize
            		'Wscript.Echo "Time (ms) = " & vbTab & objRetStatus.ResponseTime
           	 	'Wscript.Echo "TTL (s) = " & vbTab & objRetStatus.ResponseTimeToLive
        		end if
End Function 	



Class PrinterFailover

	Public PS_PROD
	' Private
	Private oShell
	Private Sub Class_Terminate()
		Set oShell = Nothing
	End Sub

	Private Sub Class_Initialize()
		Set oShell = WScript.CreateObject("WScript.Shell")
		HKEY_CURRENT_USER = &H80000001	
		' Rev2
		HKCU_DEFAULT_PRINTER = "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device"
		' end rev2

	End Sub

	Public Function UpdatePrinters()
		Dim v, ar, i, j

		ar = arPrinters()

		Dim retValueNames
		Dim retValueTypes
		Dim sKeyPath: sKeyPath = "Printers\Connections\"
		Dim RegFullKeyPath
		Dim arRegVal()
		Dim nName : nName = 0
		Dim nType : nType = 1
		Dim nVal  : nVal  = 2
		' rev2
		Dim PrintersUpdated: PrintersUpdated = False	
		Dim DefPrinter: DefPrinter = DefaultPrinter()
		' End rev 2

		For i = 0 to UBound(ar, 1)

			If InStr(ar(i), PS_PROD) > 0 Then
				'WScript.Echo "Updating printer key: " &  ar(i)
				' rev2
				PrintersUpdated = True
				' end rev2

				RegFullKeyPath = sKeyPath & ar(i)
				Call EnumRegVals(RegFullKeyPath, _ 
				                 retValueNames, _
				ReDim arRegVal(3, UBound(retValueNames))
				For j = 0 To UBound(retValueNames) 
				  '  WScript.Echo "Value Name: " & retValueNames(j)  & " : " & oShell.RegRead("HKCU\" & RegFullKeyPath & "\" & retValueNames(j) )
				    arRegVal(nName, j) = retValueNames(j)
				    arRegVal(nType, j) = RegTypeNameFromVal(retValueTypes(j))
				    arRegVal(nVal,  j) = oShell.RegRead("HKCU\" & RegFullKeyPath & "\" & retValueNames(j))
				oShell.RegDelete "HKCU\" & RegFullKeyPath & "\"
				For j = 0 to UBound(arRegVal, 2)
					oShell.RegWrite Replace("HKCU\" & RegFullKeyPath & "\" & arRegVal(nName, j), PS_PROD, PS_BACKUP), _
					Replace(arRegVal(nVal, j),PS_PROD, PS_BACKUP), _
					arRegVal(nType, j)
			End If
		' rev2
		' Only update the default printer if we failed over something
		If PrintersUpdated Then
		End If
		'end rev2
	End Function

	Public Sub EnumRegVals(ByVal sKeyPath, _
			       ByRef retValueNames, _
			       ByRef retValueTypes)
	' WMI reference

		Dim sComp: sComp = "."
		Dim i, oReg
		Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ 
		   sComp & "\root\default:StdRegProv")

		oReg.EnumValues HKEY_CURRENT_USER, sKeyPath,_
		   retValueNames, retValueTypes
	End Sub
	Private Function RegTypeNameFromVal(RegType)
		const REG_SZ = 1
		const REG_EXPAND_SZ = 2
		const REG_BINARY = 3
		const REG_DWORD = 4
		const REG_MULTI_SZ = 7
		Dim s
		Select Case RegType
		Case REG_SZ
		   s =  "REG_SZ"
		   s = "REG_EXPAND_SZ"
		   s = "REG_BINARY"
		   s = "REG_DWORD"
		   s = "REG_MULTI_SZ" ' Even though RegWrite won't suppor this type
		End Select
		RegTypeNameFromVal = s
	End Function
	Private Function arPrinters()
		Dim sComp: sComp = "."
		Dim sKeyPath : sKeyPath = "Printers\Connections"
		Dim ar, subkey, oReg

		Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ 
		sComp & "\root\default:StdRegProv")
		oReg.EnumKey HKEY_CURRENT_USER, sKeyPath, ar
		arPrinters = ar	
	End Function
	' rev2
	Private Function DefaultPrinter()
		Dim s
		s = oShell.RegRead(HKCU_DEFAULT_PRINTER)
		DefaultPrinter = s
	End Function
	Private Sub UpdateDefaultPrinter(DefPrinter)
		oShell.RegWrite HKCU_DEFAULT_PRINTER, Replace(DefPrinter, PS_PROD, PS_BACKUP)
	End Sub

	' end rev2

End Class

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Latest member