Networking Forums

Networking Forums > Computer Networking > Windows Networking > Setting Printer Based on Location

Reply
Thread Tools Display Modes

Setting Printer Based on Location

 
 
Tom E. Pinkerton
Guest
Posts: n/a

 
      10-28-2004, 04:46 PM
Friends,

My issue, in brief: I need to find a way to create the proper printer
connection and set it as the default printer based upon where the user
is logging on.

Our setup: We have a single server running Windows Server 2003
Standard. We have one main computer lab, in which all computers share
an HP Business Inkjet 1100d printer. We have a library and a few
classrooms in which several computers share one printer, and in each
additional classroom there is one computer with a single printer that
is physically connected to the computer. Most computers are assigned
dynamic IP addresses through DHCP.

Currently, we are not using any sort of login script at all, so I am
willing to consider any login scripting language/processor that will
suit the task.

Any suggestions or recommendatiosn would be most welcome.

Thanks!

=Tom=
 
Reply With Quote
 
 
 
 
Torgeir Bakken \(MVP\)
Guest
Posts: n/a

 
      10-28-2004, 06:14 PM
Tom E. Pinkerton wrote:

> Friends,
>
> My issue, in brief: I need to find a way to create the proper printer
> connection and set it as the default printer based upon where the user
> is logging on.
>
> Our setup: We have a single server running Windows Server 2003
> Standard. We have one main computer lab, in which all computers share
> an HP Business Inkjet 1100d printer. We have a library and a few
> classrooms in which several computers share one printer, and in each
> additional classroom there is one computer with a single printer that
> is physically connected to the computer. Most computers are assigned
> dynamic IP addresses through DHCP.
>
> Currently, we are not using any sort of login script at all, so I am
> willing to consider any login scripting language/processor that will
> suit the task.

Hi

To do this, you need a logon script.

I would think that each room does not have it's own IP range,
so then you have two ways to handle the location issue.

Three options below (all code below is in VBScript) + some links
to some more general logon script info below that again:


************************************************** ********

1)
In AD, create an OU for each room, and put the different computer
objects into the OU that represents the room for the computer.

In the user logon script, you can then pick up the location based on
the OU the computer is placed in:

'--------------------8<----------------------
Set oADSystemInfo = CreateObject("ADSystemInfo")

Wscript.Echo "Computer's distinguished name: " & oADSystemInfo.ComputerName

' get computer object from AD for current computer
Set oComputer = GetObject("LDAP://" & oADSystemInfo.ComputerName)

Wscript.Echo "Computer object's parent path: " & oComputer.Parent
'--------------------8<----------------------


2)
To avoid messing with the OU structure, you could just put the location
of the computer into the description field of the AD computer object.

In the user logon script, you can then pick up the location based on
the computer description:

'--------------------8<----------------------
Set oADSystemInfo = CreateObject("ADSystemInfo")

' get computer object from AD for current computer
Set oComputer = GetObject("LDAP://" & oADSystemInfo.ComputerName)

Wscript.Echo "Computer's description: " & oComputer.Description
'--------------------8<----------------------


3)
If you can't/don't want to do anything with the computer objects in AD:

Create a registry value or a file on each computer indicating the room
placement, and let the logon script test on this.

************************************************** ********


For some more VBScript examples, take a look under "Group Membership
Tests" and "Logon Scripts" under "Free VBScript Code" at
http://www.rlmueller.net/

You will also find logon script examples with group testing etc. at
http://cwashington.netreach.net as well.

E.g. here:
http://cwashington.netreach.net/depo...e=LogonScripts


Some more general logon script links:

Frequently Asked Questions about Logon Scripts
http://www.rlmueller.net/LogonScriptFAQ.htm

Logon Script info at LabMice.net
http://labmice.techtarget.com/script...gonscripts.htm

Enterprise Logon Scripts
http://www.microsoft.com/downloads/d...displaylang=en






--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scr...r/default.mspx
 
Reply With Quote
 
=?Utf-8?B?RGFuQw==?=
Guest
Posts: n/a

 
      10-28-2004, 09:53 PM
Hey Tom;

I do not use script for this. I install the printer on the machine that way
that every users that logs in on the machine sees only that printer (like it
is installed localy)
It very simple in dos. see
http://support.microsoft.com/default...b;en-us;189105.

I use it for years ans works fine. The advantige is that you don't have to
install printers in userprofiels an d the user has always the good printer.

Good Luck
Greets
DanC

"Tom E. Pinkerton" wrote:

> Friends,
>
> My issue, in brief: I need to find a way to create the proper printer
> connection and set it as the default printer based upon where the user
> is logging on.
>
> Our setup: We have a single server running Windows Server 2003
> Standard. We have one main computer lab, in which all computers share
> an HP Business Inkjet 1100d printer. We have a library and a few
> classrooms in which several computers share one printer, and in each
> additional classroom there is one computer with a single printer that
> is physically connected to the computer. Most computers are assigned
> dynamic IP addresses through DHCP.
>
> Currently, we are not using any sort of login script at all, so I am
> willing to consider any login scripting language/processor that will
> suit the task.
>
> Any suggestions or recommendatiosn would be most welcome.
>
> Thanks!
>
> =Tom=
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BSNL, India's Telecom Giant, First to Provide Location-Based Services naveenjain12@gmail.com Broadband 0 07-06-2007 10:08 AM
setting up a remote location (another netbios domain, maybe)... egiblock@gmail.com Windows Networking 6 11-03-2006 10:16 PM
Give access based on location vidro Windows Networking 4 08-22-2005 05:26 PM
Setting-up a linux-based router for bandwidth Rashioning Ringo Langly Linux Networking 2 01-05-2005 09:02 AM
Help setting up Prism3 USB-based WLAN on kernel 2.6.8.1 Lewin A.R.W. Edwards Linux Networking 2 10-22-2004 01:06 AM



1 2 3 4 5 6 7 8 9 10 11