Setting up network printer in Windows 7

Page 3 of 3 FirstFirst 123

  1. Posts : 8
    W7 32
       #21

    Chev65, yes those suggestions are valid, however as stated in the "to address other possible questions" post i made last, we have so many slow WAN links, that we don't want to run a centralized print server, which is what typical GPO based printer installs utilize. Setting up a local IP printer port on each machine to the local IP/network printers works faster, cuts down traffic on our already slow WAN links, and is not affected by a WAN link outage.

    WindowsStar: the scripts are run via a domain based GPO that runs a unique computer startup script for each respective site's specific printers. I only have to assign a pc to it's site domain OU and it applies the startup script to that pc (effective at next restart that is).

    the registry check is done by the script on each local machine. in XP anyways, each printer has a registry entry for the name of the printer, if you do a simple FIND | REG QUERY for that reg key, you'll either get a successful find which results in error level 0 which means the printer is already installed and the script skips on to the next loop and checks to see if the next printer in the list is installed. If a printer is not there, it proceeds with the cscript/prnport/printui scripting to install the printer.

    the printer reg check from the script i posted originally:
    FIND | REG QUERY "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\!P!"
    IF ERRORLEVEL 1 (

    so to answer your question, the registry check runs on the local machine to see if the desired printers are installed or not, if not, it installs them
      My Computer


  2. Posts : 8
    W7 32
       #22

    to clarify the printer variable declaration part of the script:

    SET P1=%AestheticNameOfPrinter (some name i want to call the printer, like CentralOffice-2
    SET PIP1=%1x.x.x.x (the ip, requires the 1 at the beginning, can't remember why off hand)
    SET PNAME1=%"TOSHIBA eS452/453Series PCL6" (the actual driver name of the printer, from inf file)
    SET PDRIVER1=%"\\LocalSitePCname\PRINTERDRIVERS\352-353-452-453\eB4ox2.inf"(path to local driver share)
      My Computer


  3. Posts : 2,737
    Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
       #23

    @MattLieblong

    Sorry to ask so many questions, I am trying to figure out if there is a better way to do this for you. We have been converting to Windows 7 from Windows XP and have found issues with the way printers were assigned via GPO and XP but we were able to work around them. When we started using Windows 7 we had a whole new set of issues. We tried deploying printers similar to how you have done, but had many many issues. Then we deployed them via other means and never had that work very well. Deploying printers with Windows Server 2008 R2 AD was not an option due to all the different Windows machines in the mix as well as many older special systems.

    I wrote a custom script that works through GPO to deploy printers on Windows XP and Windows 7 as well as knowing the difference between 32bit and 64bit. The script I wrote will not work for you because you are not using print servers and we are. However I am looking at the script and seeing if it could be modified to be used in your type of setting.

    What I was thinking due to your bandwidth limitations is using GPO for the unique settings for each location as well as the printer information. Then the script (universal) could be deployed as part of the logon script. Each machine would run the script; the script would check GPO for the printer settings and then add them.

    I don't know if that is something you want to do or if you are willing to do a bunch of testing. Plus there would be a commitment on my side to work out all the bugs.

    You would be able to create groups like:

    Location 1
    ------------- Printer 1
    ------------- Printer 2
    ------------- Printer 3

    Location 2
    ------------- Printer 1
    ------------- Printer 2

    Location 3
    ------------- Printer 1
    ------------- Printer 2
    ------------- Printer 3
    ------------- Printer 4
    ------------- Printer 5

    Then add computers to the group and they would get the printers assigned to the group. Or if you want to do it by AD usernames. You could simplify it by not caring about the locations and just creating the printer groups. Then if you wanted to add a printer across the WAN for one computer in another location you could do that without having to modify stuff or add the printer via some remote desktop manually. There are many ways to do this.

    Maybe you have a better way or an ideal way you wish it could be done that can be done.

    Let me know your thoughts. -WS
      My Computer


  4. Posts : 8
    W7 32
       #24

    @WindowsStar
    I'm open to any solution that is functional and manageable. We have only a couple actual support techs to cover over a thousand workstations and users. The previous printer script was a godsend to implement, and continues to save us dozens of man-hours a week. Actually, it doesn't really save us any time, it does dozens of hours of work we never had time to get to before.

    Just to make sure the overall model is clear, the gpo aspect is utilized only to deploy a startup script. the printers themselves are not managed via gpo, or listed via gpo. the gpo only tells respective member OU pc's to run a specific script at startup.

    I'm pretty close, i actually ran the xp script on a W7 machine and it worked, installed the first printer in the script, but upon subsequent loops got hung up or threw 0x000006be errors. All i did to the W7 machine was copy the prnport and other built in windows tools to the system32 folder.

    I think at this point, i would like to try to tweak it to work on w7 with the current design. Would rewriting my script in vbs or some other language open up any new functionalities over batch?
      My Computer


  5. Posts : 2,737
    Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
       #25

    MattLieblong said:
    @WindowsStar
    I'm open to any solution that is functional and manageable. We have only a couple actual support techs to cover over a thousand workstations and users. The previous printer script was a godsend to implement, and continues to save us dozens of man-hours a week. Actually, it doesn't really save us any time, it does dozens of hours of work we never had time to get to before.

    Just to make sure the overall model is clear, the gpo aspect is utilized only to deploy a startup script. the printers themselves are not managed via gpo, or listed via gpo. the gpo only tells respective member OU pc's to run a specific script at startup.

    I'm pretty close, i actually ran the xp script on a W7 machine and it worked, installed the first printer in the script, but upon subsequent loops got hung up or threw 0x000006be errors. All i did to the W7 machine was copy the prnport and other built in windows tools to the system32 folder.

    I think at this point, i would like to try to tweak it to work on w7 with the current design. Would rewriting my script in vbs or some other language open up any new functionalities over batch?
    If you are close then let's work on the current script. VBScripts give you access to WMI so almost anything can be done.
      My Computer


  6. Posts : 1
    W7 32 Ent.
       #26

    Windows Star,
    "If you have the printer shared off a server there is a much better way of doing this and I have a different script for that let me know."

    Would this script work for setting a default printer for new users?
      My Computer


  7. Posts : 2,737
    Windows 7 Enterprise (x64); Windows Server 2008 R2 (x64)
       #27

    @beebobby

    I am not sure what you are asking me. I was helping the OP with printing. I was not the one in need of help.
      My Computer


  8. Posts : 8
    W7 32
       #28

    WindowsStar said:
    @MattLieblong

    How do you deploy the scripts? Are the scripts on each machine? or are they stored somewhere? Is the registry key to tell you if they get a certain printer or to tell you which printers they get?

    I use GPO's to deploy the printer-install startup scripts, respectively one for each WAN site I have. From the template I posted last year I created a custom script for each office that installs every network printer at each respective office. The script is manually managed, set via GPO to run at startup, and check the registry for the value of that unique printer name setup in the startup script. So it doesn't check for "dell printer" it checks for "OfficeName-Floor#-section".

    So PC1 in officeA boots up, GPO tells it to run a script "PRNofficeA" which is stored on the Domain Controllers in the \\domain\netlogon folder. The batch script file does traverse the WAN link on each run, but only the script, no drivers. As the script runs, if a printer in the script is not installed(known by reg check), it then does a Printui.dll windows-based scripted install, which as many have described above, needs a printer Name, IP, Driver-specific device name, and the .inf driver file. The drivers are kept on a local machine at each office, and the script for each office lists the path to the inf driver file. The inf file then tells the printui.dll script which additional files to copy over (across the local switch), the driver installs, printer installs, and voila.

    Then to change them down the road, there is a deletion trigger also within the printui.dll method. I don't even mess with updating drivers of existing printers, it's all local, so i just delete a printer, and recreate it.
      My Computer


  9. Posts : 8
    W7 32
       #29

    I replied before I went and re-read the entire thread. Sorry if I repeated any explanations.

    I figured out the problem in Windows 7, part of it I had already posted the solution to...Microsoft moved the Printui.dll script set to a subfolder (windows\system32\Admin_Printer_Scripts or something close). so you just need to adjust your scripts to call it from that new W7 location. OR, if you are using all 32 bit or all 64 bit workstation OS's anyways, if you just copy the printui.dll set (7 files i believe) over to the XP-default location for them (windows\system32) then the same scripts will work on W7 and XP (as long as all the pc's you run it against are the same OS bit rate).

    The main issue in the testing I did a year ago, was that I was testing on a 64 bit W7 box, and was trying to use 32 bit drivers. DOH! Got that resolved, we don't deploy any 64 W7 boxes anyways, so as i described above, i'm able to continue using the same install scripts, just had to make sure the drivers it called during install were all 32 bit W7 compatible.

    Problem now, is that it seems MS moved the UnsignedDriverSucceed GPO option out of the machine side of group policy, over to the user side. I'm in the middle of finally deploying W7's and have run into this. You'd be amazed how many drivers from major manufacturers websites are not signed, and thus cause these printer scripts as this this thread describes to fail.
      My Computer


  10. Posts : 1
    Windows 7
       #30

    WindowsStar said:

    Yep that page is confusing, but it does work, however it is a lot more work to use those commands then it is to just add the printer through the GUI.

    Actually that page doesn't really describe how to add a network printer directly.
    And believe me, spending an hour or two making a batch file is MUCH LESS WORK than doing the printer wizard 50+ times.
      My Computer


 
Page 3 of 3 FirstFirst 123

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:35.
Find Us