Computing.Net > Forums > Windows NT > NT Logon script for mapping printers

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

NT Logon script for mapping printers

Reply to Message Icon

Name: Matthew
Date: March 8, 1999 at 12:47:11 Pacific
Comment:

Okay! I tried the links below but couldn't find anything on mapping printers to Win95 & NT clients via logon script. I want to assign users to groups and have the script check the groups that the user belongs and then map the printer according to group id.

Any ideas?

Thanks

Matt



Sponsored Link
Ads by Google

Response Number 1
Name: Kevin Watson
Date: March 9, 1999 at 06:06:56 Pacific
Reply:

Don't know that you will be able to map printers based on USERGROUPS. The only logon script variables that I am aware of are %homedrive%, %homepath%, %homeshare%, %os%, %processor%, %username%, %userdomain%.
However, here is the script segment we use to map printers for individual users.

This is a sample of application specific mappings based on usernames mapping to specific shared dricves and network printers.
I use the 2 different subscripts to map different printers based on the users location in the building.
:ACCPAC
REM MAPS THE ACCPAC DATA DRIVES FOR AUTHORIZED USERS
REM YOU MUST ADD AN ENTRY FOR EACH AUTHORIZED USER
if %username%==denisel goto ADDACC1
if %username%==acctemp goto ADDACC2
goto ENDACCPAC
:ADDACC1
net use l: \\chipont\financedata
net use lpt2: \\chipont\HP4000ADMIN
goto ENDACCPAC
:ADDACC2
net use l: \\chipont\financedata
net use lpt2: \\chipont\HP5FINANCE
goto ENDACCPAC
:ENDACCPAC


This is the section of the script that we use to map printers for WIN95 users.

:ADDWIN95
REM THIS SECTION RESETS PRINTERS FOR WIN95 USERS AND MAPS THE SHARED HOME DIRECTORY
if %OS%==Windows_NT goto END95ADD
if exist lpt2: net use lpt2: /delete
if exist lpt3: net use lpt3: /delete
net use lpt2: \\chipont\HP4000ADMIN
net use lpt3: \\chipont\HP-4-ONT-BULLPEN
net use u: /home
:END95ADD

I hope this helps...if you have questions, feel free to email me.


0

Response Number 2
Name: Alex Reynolds
Date: March 9, 1999 at 18:21:01 Pacific
Reply:

The NT Resource Kit comes with a utility called IFMEMBER. With that utility you do something like:
IFMEMBER "ACCOUNTING" THEN NET USE LPT2: \\DOMAIN\BIGPRINTER
IFMEMBER "JANITORIAL" THEN NET USE LPT2: \\DOMAIN\MOPBUCKET

or something like that. The IFMEMBER utility checks for group membership. I do remember there being a problem if a user is a member of too many groups (like 32). Check MS site for a fix.


0

Response Number 3
Name: Derrick Martin
Date: May 8, 2000 at 13:08:16 Pacific
Reply:

What if you wanted to map specific drives based on a user's group membership? How do you do that?


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Trapping whether printer ... osa9



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: NT Logon script for mapping printers

NT logon scripts www.computing.net/answers/windows-nt/nt-logon-scripts/2838.html

NT Logon Scripts www.computing.net/answers/windows-nt/nt-logon-scripts/835.html

Logon Script for mapping user home directories. www.computing.net/answers/windows-nt/logon-script-for-mapping-user-home-directories/1664.html