+ Post New Thread
Results 1 to 9 of 9
Windows 7 Thread, Add printer script? in Technical; I'm having problems in finding a working script to add a printer to a Win7 client. I don't use AD ...
  1. #1

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,822
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168

    Add printer script?

    I'm having problems in finding a working script to add a printer to a Win7 client.

    I don't use AD I just have my server as a file/print/dhcp/dns server and with XP machines I can simple run a nice vbs script to add printer/and or set default.

    I couldn't get these to work on Win7 machines but since I was setting up batches I just manually added them into my first machine and then cloned the machine.

    This policy has now completely failed me when the suite printer went AWOL and I put a new model in instead - all XP sorted on next re-boot - but I'm having to around the Win7 teachers machines one at a time and sort them out

    I got caught out big time as it turns out a lot of them didn't have the school photocopier installed either

    So is it actually possible (in the real world ) to script the addition of a w2k3 server printer for a win7 client?

    Si

  2. #2

    Join Date
    Nov 2008
    Posts
    137
    Thank Post
    6
    Thanked 3 Times in 2 Posts
    Rep Power
    12
    Code:
    rundll32 printui.dll,PrintUIEntry /in /q /n "\\server\sharename"
    This is what we used for Windows XP, and a quick test shows it to work in Windows 7 as well (add it as either a line in a user logon script or a batch file in a user gpo)
    Last edited by imunro01; 21st March 2012 at 09:12 AM.

  3. #3

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,822
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    Gives Windows cannot connect to the printer at my end

    Did the computer you tried it on already have the drivers loaded for that printer?

    Si

  4. #4

    Join Date
    Sep 2010
    Posts
    228
    Thank Post
    3
    Thanked 36 Times in 33 Posts
    Rep Power
    16
    If W7 clients are 64bit have you installed the 64bit drivers on the server?
    Have you checked the security permissions on the printer share?

    I've not tried it on W7 but I have been using something very similar on XP for years, the only other thing that I can think of that could cause problems is the extra security features W7 has built in.

  5. Thanks to ToyHeartsFan from:

    SimpleSi (21st March 2012)

  6. #5


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,647
    Thank Post
    229
    Thanked 865 Times in 743 Posts
    Rep Power
    297
    do point and print restrictions apply to workgroup computers if so might be worth turning it off with gpedit.msc. Also if uac is on if it elevates to install the elevated user probably dosent have access to the "server"

  7. #6
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    1,220
    Thank Post
    216
    Thanked 226 Times in 195 Posts
    Rep Power
    73
    We use the following in a VBS file at login:

    Code:
    Set WshNetwork = CreateObject("WScript.Network")
    WshNetwork.AddWindowsPrinterConnection "\\server\printer"
    Seems to work OK. Make sure you have drivers that match ie 32bit or 64bit. You may need to add 64bit drivers to the server if thats what your Windows 7 machines are running

  8. #7

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,822
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    These are Win7 64 bits clients ;(
    How do I install Win 7 64bit drivers on the server - everything I try only gives me options for w2k3/XP and below

    I've downloaded the Win7 64 bit driver and files are in a folder but I can't do anything with them.

    regards

    Simon

  9. #8
    themightymrp's Avatar
    Join Date
    Dec 2009
    Location
    Leeds, West Yorkshire
    Posts
    1,220
    Thank Post
    216
    Thanked 226 Times in 195 Posts
    Rep Power
    73
    Quite easy. Have you already got the 32bit drivers on the server? (Not necessary but easier)

    Go to the properties of the shared printer. On the 'Shared' tab, click the button for Additional Drivers. You should see the 32bit x86 option is already ticked and says 'yes' next to it. Tick the box for x64, wait a moment and you should be prompted to browse for the drivers. Point to your download and let it add them in. You should end up with a 'yes' next to both kinds.

    If you don't already have the 32bit drivers installed do this. Go to the Print Server Properties. You should see 4 tabs I think? One is called drivers. Go to that and click the Add button. Untick the 32bit option and tick the x64 option. Again browse for your downloaded drivers.

    Let me know if that helps

  10. #9

    Join Date
    Sep 2010
    Posts
    228
    Thank Post
    3
    Thanked 36 Times in 33 Posts
    Rep Power
    16
    Quote Originally Posted by SimpleSi View Post
    These are Win7 64 bits clients ;(
    How do I install Win 7 64bit drivers on the server - everything I try only gives me options for w2k3/XP and below

    I've downloaded the Win7 64 bit driver and files are in a folder but I can't do anything with them.

    regards

    Simon
    I haven't needed to do this yet myself but as far as I know all you need to do is install the 32bit drivers on your 2003 server then open the sharing tab on the printer and use the additional drivers button, then just point it at your 64 bit drivers.

SHARE:
+ Post New Thread

Similar Threads

  1. A Printer Script
    By Ric_ in forum Scripts
    Replies: 164
    Last Post: 1st October 2010, 10:11 AM
  2. Replies: 21
    Last Post: 11th July 2006, 07:37 PM
  3. Printer Scripts
    By Gordie in forum Windows
    Replies: 1
    Last Post: 21st February 2006, 04:35 PM
  4. printer scripts again!
    By chrbb in forum Windows
    Replies: 4
    Last Post: 10th February 2006, 12:19 PM
  5. Add printer script not workling
    By mark in forum Windows
    Replies: 6
    Last Post: 15th September 2005, 10:07 AM

Thread Information

Users Browsing this Thread

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

Posting Permissions

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