Welcome, Register for free! or Login below:
EduGeek.net RSS Feeds Register FAQ Members Social Groups User Map Calendar Search Today's Posts Mark Forums Read

Windows

Windows forum sponsored by

For all of your Windows problems

Go Back   EduGeek.net Forums > Technical > Windows
Reply
 
LinkBack Thread Tools Search Thread
Sponsored Links
Old 29-12-2008, 03:31 PM   #1
 
silver's Avatar
 
Join Date: Dec 2008
Location: South
Posts: 98
uk
Thanks: 4
Thanked 4 Times in 2 Posts
Rep Power: 2 silver is on a distinguished road
Default Printers on a network

Before I start,please can you bear with me. I have been, for various reasons, left in charge of a small network in a nursery school and I thought I knew quite a lot about IT, but apparently not.
This question is similar to the thread about network printing, but I am afraid that I do not understand the answers given there. I do hope that someone can explain what I need to know in words of one syllable if possible.
I am running Server 2003
I can install a network printer fine, but.. I have NO idea how to specify who sees which printer. I see I might have to do something with a log on script (I DO know where they are!!) but I really don't know exactly what I should be putting or where.
????: EduGeek.net Forums http://www.edugeek.net/forums/windows/28392-printers-network.html
Told you I didn't know much. We are talking very basic knowledge here.
Or maybe Michael can explain how to sort out my system from the printer end?
All help very gratefully received
  Reply With Quote
Old 29-12-2008, 03:46 PM   #2
 
Domino's Avatar
 
Join Date: Oct 2006
Location: Hastings
Posts: 1,740
uk uk sussex
Thanks: 26
Thanked 134 Times in 112 Posts
Blog Entries: 4
Rep Power: 34 Domino is a splendid one to beholdDomino is a splendid one to beholdDomino is a splendid one to beholdDomino is a splendid one to beholdDomino is a splendid one to beholdDomino is a splendid one to beholdDomino is a splendid one to behold
Send a message via MSN to Domino
Default

A log on script is probably the best way for you...you say you have some already? do you know what they are written in?

Does every user have a seperate account? are the clients 2000/xp/vista?
  Reply With Quote
Old 29-12-2008, 03:56 PM   #3
 
Mcshammer_dj's Avatar
 
Join Date: Feb 2007
Location: Portsmouth
Posts: 259
uk uk england
Thanks: 5
Thanked 29 Times in 22 Posts
Rep Power: 10 Mcshammer_dj has a spectacular aura aboutMcshammer_dj has a spectacular aura about
Send a message via MSN to Mcshammer_dj
Default

Assuming that you have the printer installed on the server, then changes to the script below will allow you to set the default printer direct from the server.

This should be set to OU via the group policy


option Explicit
On Error Resume Next
Dim WshShell, WshNetwork, strprintername
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshNetwork = WScript.CreateObject("WScript.Network")




WshNetwork.AddWindowsPrinterConnection("\\portpr-dc-01\hpcolorL")


' Set Default Printer

WshNetwork.SetDefaultPrinter "\\severname\sharename"
  Reply With Quote
Old 29-12-2008, 04:02 PM   #4
 
matt40k's Avatar
 
Join Date: Jun 2008
Posts: 1,315
uk uk england
Thanks: 99
Thanked 112 Times in 99 Posts
Rep Power: 23 matt40k is a name known to allmatt40k is a name known to allmatt40k is a name known to allmatt40k is a name known to allmatt40k is a name known to allmatt40k is a name known to all
Default

Printers, IMHO, are the ICT Technician's worst nightmare.

Anyway, simplest (maybe) way would be add a new (user) group policy called printer (assuming there is only 1) and get it to run a script on login. (\\server\netlogon\printer.vbs)

A simple (VBS) script for add (and defaulting) the printer

Open NOTEPAD, save as printer.vbs (make sure you remember the .vbs at the end) enter the below:

On error resume next

Dim Network, printer

Set Network = CreateObject("Wscript.Network")
printer = "\\server\printer"

Network.AddwindowsPrinterConnection printer
Network.SetDefaultPrinter printer

Set Network = Nothing

wscript.quit

Update:
Mcshammer_dj bet me to it!!

Last edited by matt40k; 29-12-2008 at 04:04 PM..
  Reply With Quote
Old 29-12-2008, 04:14 PM   #5
 
SteveMC's Avatar
 
Join Date: Feb 2006
Location: Isle of Wight, UK
Posts: 110
uk uk isle of wight
Thanks: 18
Thanked 17 Times in 16 Posts
Rep Power: 9 SteveMC will become famous soon enough
Send a message via MSN to SteveMC
Default

You might have an issue with the scripts above, if the users don't have permission to install new printer drivers (if it's a small number of machines you can always install the drivers by hand as administator on each machine).

If you use the printui.dll facility, it should sort out the drivers even if they're not already on the client machines.
????: EduGeek.net Forums http://www.edugeek.net/forums/showthread.php?t=28392

Here's the part of our script that deals with printers:

Code:
Dim objShell, objNetwork

Set objShell = CreateObject("Wscript.Shell")
Set objNetwork = CreateObject("Wscript.Network") 

AddPrinter("\\server\PrinterShareName")
objNetwork.SetDefaultPrinter "\\server\PrinterShareName"                   

Sub AddPrinter(printer)
  On Error Resume Next
  ObjShell.Run "rundll32 printui.dll,PrintUIEntry /in /n""" & printer & """", 7, true
  On Error GoTo 0
End Sub
If required, I've got a more complex one that adds printers based on the groups the users and/or the computers are in (allowing staff to see different ones to pupils, and even those to differ depending on what room they're in).

I've also realised that I need to get the script into some sort of shape for the new Network Manager that's taking over at the school (it's currently 540 lines long and handles everything from drive mapping, through printers to phones!).

Stephen

Last edited by SteveMC; 29-12-2008 at 04:19 PM.. Reason: Typos
  Reply With Quote
Old 29-12-2008, 06:20 PM   #6
 
silver's Avatar
 
Join Date: Dec 2008
Location: South
Posts: 98
uk
Thanks: 4
Thanked 4 Times in 2 Posts
Rep Power: 2 silver is on a distinguished road
Default

oh dear - I don't really understand any of those posts: it's worse than I thought.
We have three groups of users: pupils, staff and support. Users don't have separate accounts - it is done in age groups. One suite of 30 machines, plus others scattered about. All machines run XP. There is a printer in the IT suite and a couple of others in other places around
The logon script is common to all pupils, it seems
What is the difference between mcshammer_dj and matt40k's methods as they don't look the same?
I can just about create a new group policy but after that it is all a bit of a blur.
????: EduGeek.net Forums http://www.edugeek.net/forums/showthread.php?t=28392
Can anyone recommend where i should go for more help - I'm sorry but you are all so clever and I don't think you can come down to my level!!
You talk about scripts but I don't know what to do with one if I met it in the street.
  Reply With Quote
Old 30-12-2008, 12:33 PM   #7
 
kesomir's Avatar
 
Join Date: Mar 2008
Location: London
Posts: 251
uk uk city of london
Thanks: 13
Thanked 18 Times in 17 Posts
Rep Power: 6 kesomir will become famous soon enough
Default

I'm going to walk through this as slowly as I can for you.

1. I'm going to assume that the printers are installed and shared properly

2. Right click on the printer on the server and you should have a security tab where you can specify who has print access to the printer (groups and users). BY default everyone is allowed. If you don't want this, remove the allow printing for everyone and add in specific groups or users.

3. To add printers to clients you have 2 choices
  • Install the printer on the account manually by logging into it and adding the required printers
  • Using a script that runs when the user logs in to do this automatically.

Since you have a small number of accounts which are shared and appear to struggle with the idea of scripting (you would need to google this, check scripts posted here and ultimately understand them well enough to modify them for your use), I suggest you add the printers manually.
????: EduGeek.net Forums http://www.edugeek.net/forums/showthread.php?t=28392

After adding them, you can change permissions in Active Directory Group Policy (google this) to prevent the users permission to add or remove the printers if you like (optional).

SO in a nutshell:
  • Right click on the printer on the server to set permissions as to which users can print, check queues etc on each printer
  • Go login to each account and install the network printers (on the add printer dialogue enter \\SERVERNAME\PRINTERSHARENAME to locate it.

If you cannot see the printers, then they are not shared properly on the server.

[EDIT] For the scripts, you don't need to be a rocket scientist to do this, but you do require an amount of baseline knowledge on the way these tools work. It can be overwhelming at first look, which is why I suggest the manual approach for now - if you are going to be sticking with managing this system as a major role, I suggest slowly reading up on all of this until it becomes clear (or doing a few courses such as A+ and then the microsoft ones) - it's not beyond you, just daunting atm. If not, stick with the method I describe which will do what you want with the least time investment for your specific needs.

Last edited by kesomir; 30-12-2008 at 12:44 PM..
  Reply With Quote
Old 30-12-2008, 01:16 PM   #8
 
_Bat_'s Avatar
 
Join Date: May 2006
Posts: 1,236
uk
Thanks: 29
Thanked 18 Times in 13 Posts
Rep Power: 14 _Bat_ has a spectacular aura about_Bat_ has a spectacular aura about
Default

Quote:
Originally Posted by kesomir View Post
[EDIT] For the scripts, you don't need to be a rocket scientist to do this, but you do require an amount of baseline knowledge on the way these tools work. It can be overwhelming at first look, which is why I suggest the manual approach for now - if you are going to be sticking with managing this system as a major role, I suggest slowly reading up on all of this until it becomes clear (or doing a few courses such as A+ and then the microsoft ones) - it's not beyond you, just daunting atm. If not, stick with the method I describe which will do what you want with the least time investment for your specific needs.
He is right, have a browse around the site, do some searching and googling, it's surprising how quickly you pick it up. And don't be afraid to ask what might appear to others to be silly questions, anyone on here will tell you the amount of silly questions I asked in my first job just to be sure what I was doing before progressing
  Reply With Quote
Old 30-12-2008, 03:39 PM   #9
 
silver's Avatar
 
Join Date: Dec 2008
Location: South
Posts: 98
uk
Thanks: 4
Thanked 4 Times in 2 Posts
Rep Power: 2 silver is on a distinguished road
Default

Thank you very much - that is very useful. You are so helpful and kind to an aging idiot!

I know how to create and link a group policy, and I know what a script is (and that you can just get handy ones from people) - my problem is that I do not know what to put in a group policy or a log on script to make things run (and I don't know where to put a script either). oh goodness that sounds confused already.
I am browsing away but mostly you all seem to start from a place so far above my head that I can barely see you.

I would rather not log in to each account and add the printer manually, I really really would like to know how to do it via a logon script (as I said, I know where they are).
The awful thing is, I really thought I had a vague handle on all of this - but it is that I have worked on a managed system before and I only know their way of doing things!
????: EduGeek.net Forums http://www.edugeek.net/forums/showthread.php?t=28392

Just one more very silly question: if the printer security tab allows you to specify which groups and users can see the printer, why do you need to add it to the clients?
Having reread the posts I think I get some of Matt40k's now.
I am a bit scared (correction very scared) to even try to do this on my own
  Reply With Quote
Old 30-12-2008, 03:51 PM   #10
 
TonyRidal's Avatar
 
Join Date: Aug 2007
Location: South Cumbria
Posts: 221
uk uk yorkshire
Thanks: 46
Thanked 17 Times in 16 Posts
Rep Power: 6 TonyRidal will become famous soon enough
Default

I can clear that one up:

The "Security" tab tells the server who to allow to do what to the printer.

If you leave it at the default setting everyone *could* print to the printer. BUT this DOESN'T mean it will be visible to them straight away, they'd have to go browsing accross the network for it if they wanted to use it.

To make life easier for your users you'll want to give them a printer or two when they log in so they don't need to go a hunting, for that the PrintUI method above works fine for me. I just have a heap of batch files in a folder that users can run to connect to an appropriate printer. in the example below, the first line connects them to the printer and the second one sets it as their default printer.
????: EduGeek.net Forums http://www.edugeek.net/forums/showthread.php?t=28392

RUNDLL32 PRINTUI.DLL,PrintUIEntry /in /n "\\Cpsappsrv1\room2_colour"
RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /n "\\Cpsappsrv1\room2_colour"

[edit] Oh by the way - if you're going to do it this way just watch out as bits of "PRINTUI.DLL,PrintUIEntry" are, unusually for Microsoft, CaSe SeNsItIvE!

Last edited by TonyRidal; 30-12-2008 at 03:56 PM..
  Reply With Quote
Old 30-12-2008, 03:53 PM   #11
 
kesomir's Avatar
 
Join Date: Mar 2008
Location: London
Posts: 251
uk uk city of london
Thanks: 13
Thanked 18 Times in 17 Posts
Rep Power: 6 kesomir will become famous soon enough
Default

to answer your questions:

Create a new user policy that applies to all the accounts you want

In the Group Policy Editor: Default "Domain Policy\Windows Settings\Scripts (Logon/Logoff)\Logon" insert the vbs code.

Code placed in here is automagically executed when a user logs in

Quote:
if the printer security tab allows you to specify which groups and users can see the printer, why do you need to add it to the clients?
You don't have to - the users 'could' add them themselves, but we take the view that it's less hassle to provision it instead.

Setting up the share provides access to the printer resource, adding the printer to a user account sets it up for use.
  Reply With Quote
Old 30-12-2008, 03:55 PM   #12
 
SteveMC's Avatar
 
Join Date: Feb 2006
Location: Isle of Wight, UK
Posts: 110
uk uk isle of wight
Thanks: 18
Thanked 17 Times in 16 Posts
Rep Power: 9 SteveMC will become famous soon enough
Send a message via MSN to SteveMC
Default

I've attached a more complete version of our script to this message. Essentially it looks at the first 3 character of the computer's name (converted to lower case) and then sets up a connection to the desired printer(s).

You'll probably need a couple of different versions of the script, for the different groups of users.

To apply it to the users at logon, you should do the following:

1) Using the Group Policy Management console (if it's not already installed, download it from here), look for a policy that may already be applied to the users.

2) It may be simplest just to create a new policy for the purposes of applying the printer script (it's not the most efficient as it will slow down the logins slightly).
????: EduGeek.net Forums http://www.edugeek.net/forums/showthread.php?t=28392

3) Once you've opened the policy up, look in the "User Configuration" section, within "Windows Settings", "Scripts (Logon/Logoff)" and double-click the 'Logon' item on the right.

4) Click the 'Show Files' button in the window that appears, and copy the attached script into the folder (after adjusting it to your requirements).

5) Now click the 'Add' button and select the file

6) Once you've click 'OK' a few times, you should have a working logon script that will apply to any users with that OU in Active Directory.

You'll want to do the above again for each group of users (although I do have a more complicated script that can handle the different user groups from one script, but that may be overkill for your requirements).

Stephen
Attached Files
File Type: vbs map-printers.vbs (3.5 KB, 16 views)
  Reply With Quote
The Following User Says Thank You to SteveMC For This Useful Post:
silver (05-01-2009)
Old 05-01-2009, 11:09 AM   #13
 
silver's Avatar
 
Join Date: Dec 2008
Location: South
Posts: 98
uk
Thanks: 4
Thanked 4 Times in 2 Posts
Rep Power: 2 silver is on a distinguished road
Default

Thanks to all for your help. Especially SteveMC as that is exactly what I need - detailed instructions. However, I still don't understand how to adjust the script to suit my needs - what to take out, what to put in etc
Told you I was thick!
  Reply With Quote
Old 05-01-2009, 11:35 AM   #14
 
Gibbo's Avatar
 
Join Date: Feb 2008
Location: Cheshire
Posts: 845
uk uk yorkshire
Thanks: 34
Thanked 70 Times in 54 Posts
Rep Power: 17 Gibbo is just really niceGibbo is just really niceGibbo is just really niceGibbo is just really niceGibbo is just really nice
Default

You might be better using a KIXX script. I find them very simple to implement and change as needs be.

I map network drives and printers with them.

A simple script that adds a couple of printers and a network drive, and also makes certain printers the default:


CLS
small
Color b+/b
BOX (0,0,32,79,GRID) ; 'background grid'
Color b/n
BOX (5,5,27,74,Å) ; 'shadow' of the box
Color g+/b
BOX (4,4,26,73,FULL)

Color r+/b
at (2,8) "Hello,"
at (2,16) @fullname
Color y+/b
at (3,8) "DO NOT CLOSE THIS WINDOW!!!"

Color w+/b
AT (7,25) "Userid : " ; display some text strings
AT (8,25) "Full name : "
AT (9,25) "Privilege : "
AT (10,25) "Workstation : "
AT (11,25) "Domain : "
AT (12,25) "Logon Server : "
????: EduGeek.net Forums http://www.edugeek.net/forums/showthread.php?t=28392

Color y+/b
AT (7,40) @userid
AT (8,40) @fullname
AT (9,40) @primarygroup
AT (10,40) @wksta
AT (11,40) @domain
AT (12,40) @lserver

Dim $RoomName
If InStr(@WKSTA, "-") > 0
$RoomName=Left(@WKSTA, (InStr(@WKSTA, "-")-1))
EndIf

At (13,25) "Adding network drive"
use j: "\\server\sharedarea"

; Make the boardworks folder available to staff as a mapped drive
if InGroup("Staff")
At (14,25) "Adding Boardworks folder for staff"
use l: "\\server\Boardworks"
endif

; rev.1
; Deletes all mapped printers from machine
$junk = DelTree("HKEY_CURRENT_USER\Printers\Connections")

AT (15,25) "Adding IT1 Printer"
$Junk=AddPrinterConnection ("\\printserver\PRINTIT1")

if InGroup("Staff")
AT (22,25) "Adding Staff Printer"
$Junk=AddPrinterConnection ("\\printserver\PRINTSTAFF")
endif

; Find the room that the printer is in and set the default printer accordingly

If $RoomName = "IT1"
$Junk = SetDefaultPrinter("\\printserver\PRINTIT1")
Color w+/b
AT (24,25) "Setting IT1 Printer as default"
EndIf

if InGroup("Staff")
$Junk = SetDefaultPrinter("\\printserver\PRINTSTAFF")
Color w+/b
AT (24,25) "Setting STAFF Printer as default"
endif

sleep 0.5

exit

Last edited by Gibbo; 05-01-2009 at 11:43 AM..
  Reply With Quote
Old 05-01-2009, 11:59 AM   #15
 
penfold's Avatar
 
Join Date: Sep 2008
Posts: 279
uk
Thanks: 8
Thanked 21 Times in 21 Posts
Rep Power: 5 penfold will become famous soon enoughpenfold will become famous soon enough
Default

The only way to work out what to add/take out of the scripts is to try it. Just make sure you make a backup of your original script so you can revert back to it if you delete parts of the script that stop it working.

Start with just installing a printer for everyone until your happy you know how this works. You can then go about adjusting it so it only installs the printers you want, for specific rooms.

If you want to test the scripts out before you put them into a logon script you can run them locally by saving the script in your user area and running it while you are logged onto the network. This way you will be prompted with any error messages that occur if the script does not work. You can then edit the scripts to correct them and run them again. The only thing you should need to change in the sample scripts are the server(to your servername) and the printername(to your printer name) Running the script should then add printer.
  Reply With Quote
Reply
Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP! - Printers showing Offline on network firefox_2006 Hardware 8 14-10-2008 09:16 AM
Unessasary network traffic from printers. tosca925 Networks 6 14-08-2007 10:10 PM
Network Printers going offline since 2003sp2 edie209 Windows 8 11-05-2007 02:26 PM
Network Policy - printers speckytecky Networks 5 18-04-2007 09:15 AM
I'm having a really bad day with network printers! pmassingham Windows 2 19-01-2007 09:57 AM



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search Thread
Search Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:58 AM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright EduGeek.net




website uptime

© 2005 - 2009 EduGeek.net
no new posts