PC Review


Reply
Thread Tools Rate Thread

default printer based on computer, not user.

 
 
stig
Guest
Posts: n/a
 
      31st May 2005
hi.

using windows2000server on the server and various clients (2000, XP) how can i
setup the computers (or the server) so that whenever a user logs in, he or she
will get the closest printer as default?

example:
computer1 is located on floor 1, printer1 on floor 1.
computer2 is located on floor 2, printer2 on floor 2.

user logs in on computer on first floor, default printer is printer1.
next the user takes the stairs up to second floor and logs in on computer2,
optimally the default printer should now be printer2.

possible?
how?

many thanks
stig
 
Reply With Quote
 
 
 
 
Jerold Schulman
Guest
Posts: n/a
 
      31st May 2005
On Tue, 31 May 2005 17:10:03 +0200, stig <_(E-Mail Removed)> wrote:

>hi.
>
>using windows2000server on the server and various clients (2000, XP) how can i
>setup the computers (or the server) so that whenever a user logs in, he or she
>will get the closest printer as default?
>
>example:
>computer1 is located on floor 1, printer1 on floor 1.
>computer2 is located on floor 2, printer2 on floor 2.
>
>user logs in on computer on first floor, default printer is printer1.
>next the user takes the stairs up to second floor and logs in on computer2,
>optimally the default printer should now be printer2.
>
>possible?
>how?
>
>many thanks
>stig



You can do this in a logon script, if you can determine what printer goes with what computer.

The syntax for the default printer specification is See tip 672 in the 'Tips & Tricks' at http://www.jsifaq.com
Here is a Default printer specification for on of the network printers in my domain
\\jsi001.JSIINC.COM\HP Business Inkjet 2250 (PCL5C),winspool,Ne03:

Unless there is a naming convention, or OU split, I would create a text file in the netlogon share of each DC like:
computer1;specification
computer2;\specification

In my domain, here is one line:
JSI009;\\jsi001.JSIINC.COM\HP Business Inkjet 2250 (PCL5C),winspool,Ne03:

etc, so that everty computer is in the printers.txt file.

In your logon script:

set line=NONE
if not exist %LOGONSERVER%\NETLOGON\printers.txt set Device=-&goto setit
for /f "Tokens=*" %%a in ('type %LOGONSERVER%\NETLOGON\printers.txt^|findstr /b /i /l /c:"%computername%"') do (
set line=%%a
)
if "%line%" EQU "NONE" set Device=-&goto setit
set Device=%line:*;=%
set Device="%Device:\=\\%"
:setit
set reg="%TEMP%\Device_%RANDOM%.TMP"
@echo REGEDIT4>%reg%
@echo.>>%reg%
@echo [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows]>>%reg%
@echo "Device"=%Device%>>%reg%
@echo.>>%reg%
@echo.>>%reg%
regedit /s %reg%
del /q %reg%


 
Reply With Quote
 
j9
Guest
Posts: n/a
 
      2nd Jun 2005
My location has a logon.bat script that maps a printer to a computer based
on IP address. This, of course, is dependant on segregating subnets based
on location.

"Jerold Schulman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Tue, 31 May 2005 17:10:03 +0200, stig <_(E-Mail Removed)>

wrote:
>
> >hi.
> >
> >using windows2000server on the server and various clients (2000, XP) how

can i
> >setup the computers (or the server) so that whenever a user logs in, he

or she
> >will get the closest printer as default?
> >
> >example:
> >computer1 is located on floor 1, printer1 on floor 1.
> >computer2 is located on floor 2, printer2 on floor 2.
> >
> >user logs in on computer on first floor, default printer is printer1.
> >next the user takes the stairs up to second floor and logs in on

computer2,
> >optimally the default printer should now be printer2.
> >
> >possible?
> >how?
> >
> >many thanks
> >stig

>
>
> You can do this in a logon script, if you can determine what printer goes

with what computer.
>
> The syntax for the default printer specification is See tip 672 in the

'Tips & Tricks' at http://www.jsifaq.com
> Here is a Default printer specification for on of the network printers in

my domain
> \\jsi001.JSIINC.COM\HP Business Inkjet 2250 (PCL5C),winspool,Ne03:
>
> Unless there is a naming convention, or OU split, I would create a text

file in the netlogon share of each DC like:
> computer1;specification
> computer2;\specification
>
> In my domain, here is one line:
> JSI009;\\jsi001.JSIINC.COM\HP Business Inkjet 2250 (PCL5C),winspool,Ne03:
>
> etc, so that everty computer is in the printers.txt file.
>
> In your logon script:
>
> set line=NONE
> if not exist %LOGONSERVER%\NETLOGON\printers.txt set Device=-&goto setit
> for /f "Tokens=*" %%a in ('type

%LOGONSERVER%\NETLOGON\printers.txt^|findstr /b /i /l /c:"%computername%"')
do (
> set line=%%a
> )
> if "%line%" EQU "NONE" set Device=-&goto setit
> set Device=%line:*;=%
> set Device="%Device:\=\\%"
> :setit
> set reg="%TEMP%\Device_%RANDOM%.TMP"
> @echo REGEDIT4>%reg%
> @echo.>>%reg%
> @echo [HKEY_CURRENT_USER\Software\Microsoft\Windows

NT\CurrentVersion\Windows]>>%reg%
> @echo "Device"=%Device%>>%reg%
> @echo.>>%reg%
> @echo.>>%reg%
> regedit /s %reg%
> del /q %reg%
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Vista keeps stealing default status from default printer computer =?Utf-8?B?ZS50Lg==?= Windows Vista Networking 0 22nd Aug 2007 03:40 AM
Apply user based policies based on computer newsgroups.jd@gmail.com Microsoft Windows 2000 Group Policy 1 14th Sep 2006 09:06 PM
default printer based on computer, not user. stig Microsoft Windows 2000 Printing 2 2nd Jun 2005 08:19 PM
Default Printer based on Connection =?Utf-8?B?bWNvYWQwMQ==?= Windows XP General 0 25th Sep 2004 06:31 PM
Setting the a printer as default printer in all user profile Ben Microsoft Windows 2000 Printing 0 10th Mar 2004 01:34 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:46 PM.