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%"
