Adding Printer via Login Script

I have not yet begun to procrastinate.

Adding Printer via Login Script

Postby ShiftPoint » Sun Jul 05, 2009 8:38 pm

Here is an example of how I was able to add a printer to each users login via the windows 2003 login script. I added the following line to the SBS_LOGIN_SCRIPT.bat. Make sure you back up your existing script before modifying the production script.

Added:

Code: Select all
cscript %systemroot%\system32\prnmngr.vbs -ac -p "\\domain-server\OfficeWorkhorse2"


This will added the printer when the user logs on. If you want to create a .bat file that will add the printer and write the status out to the log try this:

Code: Select all
@echo off
setlocal
set LogFile=c:\logon.log
if exist "%LogFile%" del "%LogFile%"
>>"%LogFile%" echo Starting printer connection ...
cscript %systemroot%\system32\prnmngr.vbs -ac -p "\\domain-server\OfficeWorkhorse2" >>"%LogFile%"
User avatar
ShiftPoint
 
Posts: 70
Joined: Sun Jul 05, 2009 4:52 pm
Location: Pickerington, OH

Return to Windows Server 2000,2003,2008

Who is online

Users browsing this forum: No registered users and 0 guests

cron