Discussion Locked

Login script to install printers

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I need to write a login script that will install a printer for a user based on group membership.
I am not a great scriptor, and am not sure how to do this.
Can someone show me a sample script that would look at users group membership and installprinter based on that?

6 replies

by syscokid

Here's a sample logon.bat that maps drives and copies a default desktop depending on group membership. In User Mgr for Domains, where you enter the name of the login.bat, add a parameter equal to the group name. You can reference this as %1 in your bat file/

@Echo off
rem
rem * LOGON.BAT
rem *
rem *
rem * %1 is the user's group membership passed as a parameter by User
rem * Mgr for Domains (e.g., logon.bat server1 common)
rem *
rem
:whoru
if %1==slc goto :slc
if %1==managers goto :managers
if %1==common goto :common

Echo "No Group memberships, Please see your Administrator or SLC."
Pause
goto END

:common

NET USE \\computername\printersharename /persistent:yes

:slc

NET USE \\computername\printersharename /persistent:yes
goto end

:managers

NET USE \\computername\printersharename /persistent:yes
:end

by syscokid

Oops, I edited this from a previous answer I posted. Obviously this script does not map drives or copy desktops. The other did. This just maps the printer.

This discussion is closed to new replies.