Jump to content

Recommended Posts

Posted

I've got a problem with a standalone laptop, I don't want to add it to the domain as we havent got anything setup for vanila XP clients (CC3..) but I'd like to be able to map some printers from our main DC.

 

I did a quick test script that seems to be working:

 

Set WshNetwork = CreateObject("WScript.Network")

rem ** This will delete existing printers **
On Error Resume Next
Set oPrinters = WshNetwork.EnumPrinterConnections
For i = 1 to oPrinters.Count - 1 Step 2
WshNetwork.RemovePrinterConnection oPrinters.Item(i)
Next

rem ** Adds printers - new line for each printer **
Set WshNetwork = CreateObject("WScript.Network")
strPrint1 = "\\fbs-sr-001\F20-LASER"
strPrint2 = "\\fbs-sr-001\F20-COLOUR"
WshNetwork.AddWindowsPrinterConnection strPrint1
WshNetwork.AddWindowsPrinterConnection strPrint2

rem ** Setup default printer **
WshNetwork.SetDefaultPrinter strPrint1

#

 

This works great however being a standalone laptop the mappings are made as our domain admin account (must have been previously used to map a drive manually or something), this is a pain since all print jobs from this laptop wouldn't show up as the correct user for logging/quota purposes.

 

Is there a way to map the printer as a certain AD user or is the only way logging into the domain?

 

Sorry for the silly question, just want to know if theres an 'easy' route before sorting out how to get the laptop playing with the domain.

Posted
if you get them to conenct to a share it will prompt for username/password, we've found this then allows print jobs to come from the same account as it's authenicated.
Posted

You should be able to do this by adding the printer as an lpt mapped printer which allows you to specify a username to connect as, this printer will still show up in windows and so print just as the other method did.

 

object.AddPrinterConnection(strLocalName, strRemoteName[,bUpdateProfile][,strUser][,strPassword])

 

AddPrinterConnection Method

echo

 

Just make sure that you map it to an ltp port that is not in use on the computer as non admin users can't override the local mapping, lpt3 should be fine.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...