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 = ...
-
5th October 2011, 12:08 PM #1 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
-
-
IDG Tech News
-
5th October 2011, 12:14 PM #2 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
-
-
5th October 2011, 12:54 PM #3 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
-
-
5th October 2011, 12:59 PM #4 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
-
-
5th October 2011, 01:02 PM #5 
Originally Posted by
SimpleSi
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
-
-
5th October 2011, 01:10 PM #6 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
-
-
5th October 2011, 01:11 PM #7 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
-
Thanks to ricki from:
SimpleSi (5th October 2011)
-
5th October 2011, 01:18 PM #8 are you running the script from say c: or \\somewhere\something$ ?
-
-
5th October 2011, 01:19 PM #9 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.
-
Thanks to SYNACK from:
SimpleSi (5th October 2011)
-
5th October 2011, 02:02 PM #10 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
-
-
5th October 2011, 02:04 PM #11 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
-
-
5th October 2011, 02:06 PM #12 gpedit.msc locally on a machine and adjust the point and print restrictions.
Ben
-
-
5th October 2011, 02:15 PM #13 @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
-
-
5th October 2011, 02:16 PM #14
'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
-
-
5th October 2011, 02:30 PM #15
- Rep Power
- 0
Try con2prt.exe, works on both xp and 7.. very easy to understand switches too
-
Thanks to slugshead from:
SimpleSi (5th October 2011)
SHARE: 
Similar Threads
-
By tom84 in forum Scripts
Replies: 9
Last Post: 8th August 2011, 06:17 PM
-
By dombera in forum Windows 7
Replies: 5
Last Post: 30th September 2010, 10:24 AM
-
By indie in forum Windows
Replies: 1
Last Post: 14th September 2007, 11:34 AM
-
By ajbritton in forum Windows
Replies: 15
Last Post: 1st December 2006, 02:13 PM
-
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
-
Forum Rules