Jump to content

Recommended Posts

Posted (edited)

We have a Windows 2008 Domain with a mix of XP Pro and Windows 7 Professional Clients. Been having a bit of an issue with printer deployment that’s just getting worse with every tactic I try – grr! I think it’s something to do with my vbs file??

 

We have been using a printer.vbs – which appears to run but recently after log on the only print options left for students and staff are Onenote, Fax and PDF. Network printers can then be found and added but at the next logon of that user they have gone again.

 

Our domain has a DC1 running Windows Server 2008 Standard 32 Bit OS and a DC2 running Windows Server 2008 R2 64 bit OS. Print manager is enabled on DC1 and also 2 rooms that have exclusive Windows 7 deployed computers are allocated their printers via group policy – these machines do not appear in the vbs file.

 

We have 3 user OUs Admin, Staff and Student. Staff and student pick up the vbs at log on but Admin don’t and again Admin keep their deployed printers. So yet again this suggests to me that something in the vbs is screwed.

 

Any advice on how to sort this mess out would be very welcome.

 

I'm not sure this is the correct thread to post this in so if not mods my apologies and please move as you wish.

Edited by speckytecky
Posted

Is there a reason that you should stay with your current script based solution?

 

When we moved to Windows 7 we found that the scripts that we had been using for XP clients would not work at all. We changed the printer allocation method to GPP and happy days!

 

GPP is my suggestion to you [i understand that you have some remaining XP clients]

  • Thanks 1
Posted

Thanks for the reply Dave,

 

We are still about 80% XP and it's the XP clients that we are having the issues with so what would you suggest for that please?

 

 

Is there a reason that you should stay with your current script based solution?

 

When we moved to Windows 7 we found that the scripts that we had been using for XP clients would not work at all. We changed the printer allocation method to GPP and happy days!

 

GPP is my suggestion to you [i understand that you have some remaining XP clients]

Posted

Your script used to work for your XP clients and now it doesn't. What has changed? [Apart from the fact that it no longer works]

 

Have you made a change to the script?

Have you made a change to the domain that might affect this? [We had a problem a while back that we traced to us having to use FQDN] Once we started using the FQDNs the problem was solved [not a printer allocation issue]

Could you post your printer.vbs file here? Perhaps someone here could spot a problem with the syntax?

 

Other suggestions....Thinking...

 

HTH.

  • Thanks 1
Posted

yes post the script so we can look at that, how are you applying the script ie

 

1. logon or startup script

2. Is it applied to a computer OU ?

3. Is it set to process as asynchronous or just synchronous ( think those are the 2 settings )

4. Do you have it set in GPO to wait for the network

5. Is there a sleep command using wscript to wait for at least 5 or 10 seconds before running the rest of the script ?

 

Only other thing I have experienced but this was in relation to the driver getting mucked up by wsus, was we setup the print server with all the relevant printers and latest drivers and had wsus configured to update everything which in turn updated the drivers ( but only to an older version of the driver which never worked ). Had to add an exception on wsus not to upgrade any drivers ( at least not on the print server ) but there were errors on the clients in event viewer in relation to the dll files etc

  • Thanks 1
Posted

You can still use good to deploy printers to xp clients from 2k8 server. You just need to in your login script run pushprinterconnections.exe this then maps the printers.

 

You need to have installed the GP preferences update for XP.

 

This was 3 yrs ago I did that but should still work

  • Thanks 1
Posted
Thanks for those very useful replies folks - thanks willingly allocated as I'm going nuts with this one!!! Will be back with some answers to your Q's and post up the vbs on Monday.
Posted

Thanks DaveP,

 

I'm hopeful that this will be the situation with us as well. Mindful that this issue started after a 2nd DC was added to the domain it seems pretty logical thinking about it that the vbs will need a tweak or 30 to specify more exactly where the printer allocated lives. Being a fairly newbie to this I'm not sure how I would specify the location of a printer that's USBd on a workstation. I have one that gets listed as TD7\JBN for example - and coincidentally that's a PC that errors on boot up complaining about that printer path. Am I right in thinking that I'd need to amend it to domainname\td7\jbn now?

 

Your script used to work for your XP clients and now it doesn't. What has changed? [Apart from the fact that it no longer works]

 

Have you made a change to the script?

Have you made a change to the domain that might affect this? [We had a problem a while back that we traced to us having to use FQDN] Once we started using the FQDNs the problem was solved [not a printer allocation issue]

Could you post your printer.vbs file here? Perhaps someone here could spot a problem with the syntax?

 

Other suggestions....Thinking...

 

HTH.

Posted
What would you guys suggest I need to make anonymous before posting the vbs up?

 

Unless you've got anything special for access rights (passwords, real IPs etc) I wouldn't worry too much. As it'd all be internal computer names, generally I'd suggest renaming client/server names to something simple like Server1, Client2 etc just in case anyone is reading who has local access, but normal adding of printers etc shouldn't matter much.

 

Steve

  • Thanks 1
Posted

Here is the content of the vbs file:

 

Set WshNetwork = CreateObject("WScript.Network")

 

 

Dim CN

 

 

CN = wshNetwork.ComputerName

 

 

if CN = "HIPHOP3" or _

CN = "HIPHOP4" or _

CN = "HIPHOP6" or _

CN = "STAFFROOM2" or _

CN = "STAFFROOM3" or _

CN = "STAFFROOM5" or _

CN = "YOUR-E641889C92" or _

CN = "MSILAPTOP-KP" then

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

 

 

end if

 

 

if CN = "LSAPS" or _

CN = "" or _

CN = "" or _

CN = "" or _

CN = "" or _

CN = "" or _

CN = "" or _

CN = "" or _

CN = "" then

 

 

WshNetwork.AddwindowsPrinterConnection "\\LSAPS\HP Officejet Pro 8000 A809 Series"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

 

 

end if

 

 

if CN = "MM" or _

CN = "CARE" or _

CN = "DL-15-SatPrp" or _

CN = "SAVUNIT" or _

CN = "" or _

CN = "" or _

CN = "" or _

CN = "" or _

CN = "" then

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

 

 

end if

 

 

 

 

if CN = "PE2" or _

CN = "HP41991955921" or _

CN = "PE1" or _

CN = "OX6" or _

CN = "OXENWOOD4" or _

CN = "PE21jan10" then

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

 

 

end if

 

 

if CN = "KP36" or _

CN = "KP16" or _

CN = "KP18" or _

CN = "KP123" or _

CN = "KP12" or _

CN = "KPCR5" or _

CN = "ENGLISH04" or _

CN = "DEPUTYCARE" or _

CN = "TEACHR8-HP" then

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

end if

 

 

 

 

 

if CN = "DL16-Zoo187243" or _

CN = "foodtech1" or _

CN = "foodtech5" or _

CN = "foodtech10" or _

CN = "foodtech7" or _

CN = "foodtech3" or _

CN = "foodtech8" or _

CN = "foodtech9" or _

CN = "foodtech4" or _

CN = "foodtech6" then

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

WshNetwork.AddwindowsPrinterConnection "\\SEC0015997821C1"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

 

 

 

 

end if

 

 

if CN = "FJSULNO1" or _

CN = "M2No4" or _

CN = "New55" or _

CN = "MATHS72" or _

CN = "M2No2" or _

CN = "english10" or _

CN = "New61" or _

CN = "DUPLONE" then

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.AddwindowsPrinterConnection "\\SEC0015998F4C52"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

 

 

end if

 

 

if CN = "TD7" or _

CN = "TD1" or _

CN = "TD2" or _

CN = "KH12" or _

CN = "TD4" or _

CN = "TD8" or _

CN = "TD10" or _

CN = "technology1" or _

CN = "ICT-ROOM" then

wshNetwork.AddWindowsPrinterConnection "\\MySchool\TD7\JBN"

wshNetwork.AddWindowsPrinterConnection "\\ICT-ROOM\RolandMO"

wshNetwork.AddWindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

wshNetwork.AddWindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

wshNetwork.SetDefaultPrinter "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

end if

 

 

 

 

if CN = "SD434" or _

CN = "wasmaths022008" or _

CN = "M4" or _

CN = "M3" or _

CN = "M1" or _

CN = "maths052008" or _

CN = "7658Photo" or _

CN = "maths062008" or _

CN = "MATHS7" or _

CN = "MATHS8" then

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

end if

 

 

if CN = "scilabteach" or _

CN = "sc31" or _

CN = "sci32" or _

CN = "sci33" or _

CN = "scnb1a" or _

CN = "scnb2" or _

CN = "scnb3" or _

CN = "scnb5" or _

CN = "sci45" then

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\Ricoh Aficio 2060 PCL6"

WshNetwork.AddwindowsPrinterConnection "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

WshNetwork.SetDefaultPrinter "\\MySchool-DC1\RICOH Aficio 3245C PCL 6"

 

 

end if

Posted

Two things I'd say straight away:

 

Set WshNetwork = CreateObject("WScript.Network")

 

Shouldn't it be:

Set WshNetwork = WScript.CreateObject("WScript.Network")

 

Not sure if it's just best practice, or needed but either way.

 

Secondly, Do all your computer names have uppercase? As sometimes it can be case sensitive, so best to do something like:

 

CN= UCase(WshNetwork.Computername)

 

Will take a look through rest, but wondering if it's that WSCript that it's not happy with, but not sure off hand.

 

Steve

  • Thanks 1
Posted

Thanks Steve,

 

That makes sense. My thinking from the help that's been coming in on this thread is that the vbs was never a happy vbs and the added dc2 running Server 2008 R2 has somehow tightened things up so it's even more of a failure. trouble is my vbs knowledge is minimal!! So, I have been a bit all at sea with trying to sort it out.

 

Two things I'd say straight away:

 

 

 

Shouldn't it be:

 

Not sure if it's just best practice, or needed but either way.

 

Secondly, Do all your computer names have uppercase? As sometimes it can be case sensitive, so best to do something like:

 

 

 

Will take a look through rest, but wondering if it's that WSCript that it's not happy with, but not sure off hand.

 

Steve

Posted
Thanks Steve,

 

That makes sense. My thinking from the help that's been coming in on this thread is that the vbs was never a happy vbs and the added dc2 running Server 2008 R2 has somehow tightened things up so it's even more of a failure. trouble is my vbs knowledge is minimal!! So, I have been a bit all at sea with trying to sort it out.

 

Offhand those are the only two items I can see that looks "wrong" (Not wrong wrong, but potential if that makes sense), Unless i'm being blind that is :)

 

Other than that, it might be silly things like do the users have access to the printers in the first place? Remember that wherever the printers are coming from they need access to, so might be worth trying to add them as a student (Know you said local ones can be found, but wasn't sure if that's admin or not).

 

Try changing that WScript tomorrow, and see how it goes I guess (unless you have remote access :) and fancy working now! )

 

Steve

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...