+ Post New Thread
Results 1 to 14 of 14
Windows 7 Thread, Windows 7 Printer Scripting HELP!! in Technical; Afternoon! This could well be one of the first, if not THE first post on this forum so Hello everyone. ...
  1. #1

    Join Date
    Apr 2009
    Location
    Essex
    Posts
    39
    Thank Post
    3
    Thanked 6 Times in 3 Posts
    Rep Power
    12

    Exclamation Windows 7 Printer Scripting HELP!!

    Afternoon!

    This could well be one of the first, if not THE first post on this forum so Hello everyone.

    I have spent the first week of the Half-Term holidays deploying Windows 7 to all our curriculum computers around the site using WDS.

    Everything is working AOK (we were running Windows Vista before).

    EXCEPT the printers! We have the printers install depending on computer name so for example LIB-PC01 will install the Library printers:

    ; If logged onto a Library Compute
    ; Clear all printers and connect Lib-Laser and Lib-Colour
    if INSTR(@WKSTA,"LIB-") > 0
    ADDPRINTERCONNECTION ("\\server-01\Lib-Colour")
    ADDPRINTERCONNECTION ("\\curriculum\Lib-Laser")

    ;*** Printer Script for IT2 ***
    IF INSTR(@WKSTA,"IT2-") > 0
    ADDPRINTERCONNECTION ("\\printserver\IT2-Laser")

    This is very hit and miss and sometimes nothing will happen, sometimes the driver will install but the printer won't appear in the list.

    I need help with this ASAP please as I really don't want to go around the whole site installing them locally which is what I will have to do if I can't find a solution from this website or other resources.

    Thanks!

    PS. Not a biggy but the Group Policy settings for Desktop Wallpaper also seems to be playing up on W7, ie. it appears BEHIND a black desktop background. Our one is definately pushing through because when logging off it appears briefly once the black overlay(?) disappears.

  2. #2

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,593
    Thank Post
    109
    Thanked 764 Times in 595 Posts
    Rep Power
    181
    Are all the drivers pre-installed on the workstations?

    Does running the script as an admin work OK whilst running as a locked-down user fails?

  3. #3

    Join Date
    Aug 2005
    Location
    London
    Posts
    3,156
    Thank Post
    115
    Thanked 528 Times in 451 Posts
    Blog Entries
    2
    Rep Power
    124
    Can you try:
    Code:
    RUN "rundll32 printui.dll,PrintUIEntry /in /n \\server-01\Lib-Colour"
    in place of the addprinterconnection lines?

  4. #4
    Mr.Ben's Avatar
    Join Date
    Jan 2008
    Location
    A Pirate Ship
    Posts
    942
    Thank Post
    182
    Thanked 157 Times in 126 Posts
    Blog Entries
    2
    Rep Power
    65
    Have you updated your servers to 2k8 R2 yet?

    The group policy options for printers on W7 are greatly improved

  5. #5

    Join Date
    Apr 2009
    Location
    Essex
    Posts
    39
    Thank Post
    3
    Thanked 6 Times in 3 Posts
    Rep Power
    12
    Thanks for the replies so far.

    The Printer Drivers are installed locally when the printer connects for the first time. So on a newly built computer, once the printer connects for the first time on first logon, the driver is in place. The issues arise with both students, staff and administrators.


    I will try these commands tomorrow, thanks. (RUN "rundll32 printui.dll,PrintUIEntry /in /n \\server-01\Lib-Colour")

    Regarding Windows Server 2008. This could well be causing issues, we have some Windows 2003 Servers and some Windows 2008 only the 2003 ones are domain controllers/logon servers though. Today I experimented and moved a few printers over to a printserver I built as a virtual machine on one of our newest servers running Windows Server 2008 R2. The printer installations on these printers seemed more reliable until I carried out continued tests and there were still times (i'd say 3 times out of 10) when the printers just don't install.
    Last edited by Scottyboy99; 27th October 2009 at 05:51 PM.

  6. #6

    Join Date
    Sep 2009
    Location
    Belgium
    Posts
    2
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0
    Did you look at the "point and print" GPO settings? With the Win7 GPO templates you can configure your point and print settings also on computer level ("administrative templates\printers"). I had a similar problem where my printers didn't install via login script on Win7 machines. Solved this by configuring the point and print restrictions on computer level.

  7. Thanks to BartPe from:

    Duke5A (1st March 2011)

  8. #7

    Ric_'s Avatar
    Join Date
    Jun 2005
    Location
    London
    Posts
    7,593
    Thank Post
    109
    Thanked 764 Times in 595 Posts
    Rep Power
    181
    Quote Originally Posted by Scottyboy99 View Post
    The Printer Drivers are installed locally when the printer connects for the first time. So on a newly built computer, once the printer connects for the first time on first logon, the driver is in place. The issues arise with both students, staff and administrators.
    The printer driver won't install on first logon unless an adminsitrator logs on - users don't have sufficient rights (by default) to install drivers.

  9. #8

    ZeroHour's Avatar
    Join Date
    Dec 2005
    Location
    Edinburgh, Scotland
    Posts
    5,670
    Thank Post
    904
    Thanked 1,318 Times in 800 Posts
    Blog Entries
    1
    Rep Power
    445
    We have found (in xp though) that we have to add a 2-10 second delay between each attempt to add a printer so that might possibly help.

  10. #9
    tommej's Avatar
    Join Date
    Oct 2009
    Location
    Lincolnshire
    Posts
    697
    Thank Post
    38
    Thanked 130 Times in 99 Posts
    Rep Power
    77
    We couldn't get printers to work until we did this.

    cacls c:\windows\system32\spool /E /G everyone:F

    Oops sorry this was on xp, though I assume it will be the same for windows 7.
    Last edited by tommej; 5th November 2009 at 09:24 AM.

  11. #10
    gshaw's Avatar
    Join Date
    Sep 2007
    Location
    Essex
    Posts
    2,655
    Thank Post
    164
    Thanked 218 Times in 201 Posts
    Rep Power
    67
    On my office PC running 7 x64 my standard script seems to be running OK (fails because I've not put a 7-compatible driver on the server but appears to be adding until that point consistently...)

    I remember those point and print restrictions causing trouble with 2003 \ XP a while back, ended up disabling it at the time.

    Code:
    Set objNetwork = CreateObject("WScript.Network")
    
            objNetwork.AddWindowsPrinterConnection "\\server\printer"
            objNetwork.SetDefaultPrinter "\\server\printer"
    Out of interest does the GPO printer settings in 2k8 R2 let you set a default printer yet
    Last edited by gshaw; 5th November 2009 at 09:35 AM.

  12. #11

    Join Date
    Dec 2007
    Location
    Derbyshire. Ish.
    Posts
    258
    Thank Post
    29
    Thanked 22 Times in 15 Posts
    Rep Power
    24
    Quote Originally Posted by BartPe
    Solved this by configuring the point and print restrictions on computer level.
    That's the exact solution - we had the problem ourselves.

    Although we had already installed the drivers into the image when we were creating it (which worked fine with Vista) when we deployed the image, the logon script just wouldn't map printers and this "do you trust this printer?" dialogue would pop up demanding admin rights to install the drivers.

    A quick reconfiguration of point-and-print settings in the GPO was needed - even though it was already set up for our previous Vista install, it still took a tweak to work with 7.


    One thing that may prove useful to you - we moved away from using Kixtart scripts as even though I upgraded it to the latest version, it just didn't seem to want to run right. There were times when the logon script took an age to complete and the perception was that it didn't always complete properly when it did run fine. As a test, I wrote an equivalent VBScript and that executes a lot faster - so we retained it.


    As for your administratively assigned desktop wallpaper not displaying correctly, we also see this issue - although it's a niggle and a bit of a curiosity, I just haven't had time to sit down and work the problem through yet. I suspect it's down to a change in the way Windows 7 handles the desktop wallpaper aspect of a theme compared to Vista / XP, possibly even that the GPO hasn't updated itself even though I have updated the domain functional level and the GPO templates....
    Last edited by TheCrust; 5th November 2009 at 01:54 PM.

  13. Thanks to TheCrust from:

    Duke5A (1st March 2011)

  14. #12

    Join Date
    Feb 2009
    Posts
    460
    Thank Post
    66
    Thanked 34 Times in 21 Posts
    Blog Entries
    1
    Rep Power
    19
    have you gone from 32 to 64 when you moved to Win7?
    do your print servers have drivers for 32 and 64 bit OS's?
    Like others have said I would highly recommend using group policies in 2008 and the 2008 print server as they are much better than in previous server versions

  15. #13

    Join Date
    Sep 2009
    Posts
    3
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Quote Originally Posted by gshaw View Post
    Out of interest does the GPO printer settings in 2k8 R2 let you set a default printer yet
    They certainly do

    I would agree with what others have said and use the windows 7 group policies to do the printer mappings- they seem much more reliable now. We had a similar problem to yours where the printer mappings would be random (happened on XP as well) and since using the group policies we haven't had any trouble. It's much easier to customise the printer mappings with item level targeting instead of messing around with scripts as well.

  16. #14
    DMcCoy's Avatar
    Join Date
    Oct 2005
    Location
    Isle of Wight
    Posts
    3,453
    Thank Post
    10
    Thanked 493 Times in 433 Posts
    Rep Power
    111
    If you are using 7, you should use the built in point and print drivers. Then you can allow all users to install drivers, printer scripts no longer need to be run during startup.

    You need to add x86 drivers to R2 from a 32 bit W7 machine, so it also adds the 32 bit printing components.

    There are lots of drivers listed when you choose the new windows update option. I used 7 to add all the 32 bit drivers so that my Vista machines to use them on the R2 server (ideally x86 and x64 should be the same version).


    I did try the GPO options, but it slows down the logon too much compared to the logon script.

SHARE:
+ Post New Thread

Similar Threads

  1. Scripting Wireless - Windows XP/Vista
    By barryfl in forum Wireless Networks
    Replies: 18
    Last Post: 22nd June 2011, 09:57 AM
  2. Windows 2003 R2 Printer Management
    By Simcfc73 in forum Windows Server 2000/2003
    Replies: 50
    Last Post: 4th February 2010, 02:44 PM
  3. Printer Scripting
    By dave.81 in forum How do you do....it?
    Replies: 2
    Last Post: 23rd April 2008, 12:50 PM
  4. Printing to Windows Printer
    By ahunter in forum Mac
    Replies: 4
    Last Post: 1st February 2008, 12:35 PM
  5. Replies: 7
    Last Post: 27th September 2006, 08:19 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •