+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
Windows 7 Thread, Install Printers via Script in Technical; I use WPKG to deploy software and have used this vbs script Code: Option Explicit Dim netPrinter, UNCpath UNCpath = ...
  1. #1

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168

    Install Printers via Script

    I use WPKG to deploy software and have used this vbs script
    Code:
    Option Explicit
    Dim netPrinter, UNCpath
    UNCpath = "\\server2\RicohCopier"
    Set netPrinter = CreateObject("WScript.Network")
    netPrinter.AddWindowsPrinterConnection UNCpath
    WScript.Quit
    to install printers shared out on my w2k3 servers on XP but they don't work on Win7

    I beleive this to be because Win7 doesn't have the drivers built in for my photocopiers and of course my w2k3 server knows nothing about win7.

    I see posts about installing the drivers before installing/mapping the printers but I've no idea how to do this.

    I don't use domains/GPOs - the w2k3 server is just a file/print server so I'm after a simple script based approach

    Help!

    Si

  2. #2
    Mcshammer_dj's Avatar
    Join Date
    Feb 2007
    Location
    Portsmouth
    Posts
    928
    Thank Post
    35
    Thanked 160 Times in 129 Posts
    Rep Power
    93
    Go to the share and update the drivers to ensure that the drivers installed also support WIndows 7

    unless you are using 64bit WIndows 7 in which case you need to select the 64 bit drivers for the share

  3. #3


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,578
    Thank Post
    228
    Thanked 853 Times in 732 Posts
    Rep Power
    294
    1 if its x86 win7 the server 03 drivers will probably work if its x64 then just add them to the server

    2 you may need to play around with point n print settings the settings cant be set from a 2003 server but if you set them using gpmc on a win7 laptop they will apply to other win7 pcs ive found

    computer config\policies\admin templates\printers\point and print restrictions

    i set as follows (makes sense if you have the box open) enabled untick,tick do not show, do not show

  4. #4

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    As I said
    I don't use domains/GPOs - the w2k3 server is just a file/print server so I'm after a simple script based approach


    Si

  5. #5


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,578
    Thank Post
    228
    Thanked 853 Times in 732 Posts
    Rep Power
    294
    Quote Originally Posted by SimpleSi View Post
    As I said



    Si
    i assume if it can be done via a gpo there will be a local equivelent but gpp dont show on gpedit.msc so it might be a case of reghacking

  6. #6

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,341
    Thank Post
    624
    Thanked 1,584 Times in 1,421 Posts
    Rep Power
    414
    In order to install printers on windows 7 pc's you will need to edit the point and print restrictions on the clients, the easiest way is via a gpo allocated to the machines once this has been done then your vbs will work as expected until then it won't.

    Ben

  7. #7
    ricki's Avatar
    Join Date
    Jul 2005
    Location
    uk
    Posts
    1,475
    Thank Post
    20
    Thanked 164 Times in 157 Posts
    Rep Power
    52
    hi Si

    I use a bat file that works great with windows xp but when I moved to windows 7 I spent hours trying to get the scripts to work and eventually gave up and had to go for gpo because the computers would not install the drivers from the print server. The only problem I have had with the gpo and print management is that you need a windows 2008 r2 server in the domain to set the default printer if you have more than one.

    Richard

  8. Thanks to ricki from:

    SimpleSi (5th October 2011)

  9. #8


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    6,578
    Thank Post
    228
    Thanked 853 Times in 732 Posts
    Rep Power
    294
    are you running the script from say c: or \\somewhere\something$ ?

  10. #9

    SYNACK's Avatar
    Join Date
    Oct 2007
    Posts
    11,069
    Thank Post
    853
    Thanked 2,675 Times in 2,269 Posts
    Blog Entries
    9
    Rep Power
    768
    You can't install the drivers via script under limited user credentials, can you make it run as a machine startup script which would run it as system?

    The other thing you can do is edit the local policy or you can push a reg file out with this

    Code:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Printers\PointAndPrint]
    "Restricted"=dword:00000001
    "TrustedServers"=dword:00000000
    "ServerList"=""
    "InForest"=dword:00000001
    "NoWarningNoElevationOnInstall"=dword:00000001
    "UpdatePromptSettings"=dword:00000002
    http://forums.whirlpool.net.au/archive/1503702
    http://social.technet.microsoft.com/...6-a36e7d083deb

    The reg file would have to be run as a full administrator though so that would need to be run as a machine startup script or by an administrator to apply. After it is applied then the users sould be able to install the drivers off the print server as usual via the script. As above just update the printer drivers to the latest version on the server and under the shareing tab > drivers button you can add the 64 bit drivers if you need them. The drivers 32/64 need the exact same name/version number hence the need to update to the latest versions. Also old drivers are shocking under Vista/7 and will crash the spooler service continuiously.
    Last edited by SYNACK; 5th October 2011 at 01:22 PM.

  11. Thanks to SYNACK from:

    SimpleSi (5th October 2011)

  12. #10

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    This is for win7 starter netbooks with the user having full admin priviliges and UAC turned off.

    My 1st problem is that I don't know/can't see how to add Win7 drivers to the w2k3 server

    If I go into the share tab on the server I'm not given the option of Win7 (which doesn't surprise me as w2k3 wouldn't have heard of win 7!)

    The server was set to auto update but I'm doing a manual one as well in case that helps

    Si

  13. #11

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,341
    Thank Post
    624
    Thanked 1,584 Times in 1,421 Posts
    Rep Power
    414
    If there is no domain in play having re-read it I would think point and print can be configured using the local policies on the machine

    Ben

  14. #12

    plexer's Avatar
    Join Date
    Dec 2005
    Location
    Norfolk
    Posts
    13,341
    Thank Post
    624
    Thanked 1,584 Times in 1,421 Posts
    Rep Power
    414
    gpedit.msc locally on a machine and adjust the point and print restrictions.

    Ben

  15. #13

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    @synack
    I've run your script and now my install doesn't hang anymore but the printer hasn't been added as of course neither it or the server have the drivers.

    Can I get away with just sticking the drivers in a nice easy to find place?

    Si

  16. #14

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,808
    Thank Post
    1,476
    Thanked 592 Times in 444 Posts
    Rep Power
    168
    've run your script and now my install doesn't hang anymore but the printer hasn't been added as of course neither it or the server have the drivers.
    Extra info - it just took 4 minutes to come back with a dialog box to tell me that
    Si

  17. #15

    Join Date
    Oct 2011
    Posts
    73
    Thank Post
    1
    Thanked 3 Times in 3 Posts
    Rep Power
    6
    Try con2prt.exe, works on both xp and 7.. very easy to understand switches too

  18. Thanks to slugshead from:

    SimpleSi (5th October 2011)

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Deploying Printers via VBS script issues
    By tom84 in forum Scripts
    Replies: 9
    Last Post: 8th August 2011, 06:17 PM
  2. Printers via script in Windows 7 not mapping
    By dombera in forum Windows 7
    Replies: 5
    Last Post: 30th September 2010, 10:24 AM
  3. Printers logon script error messages
    By indie in forum Windows
    Replies: 1
    Last Post: 14th September 2007, 11:34 AM
  4. Replies: 15
    Last Post: 1st December 2006, 02:13 PM
  5. Registering OpenOfficeOrg 2.0 via script?
    By MistahBatson in forum Educational Software
    Replies: 2
    Last Post: 9th August 2006, 08:37 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
  •