Mapping a pritner for a user...

...how would i map a printer for a remote user to a lpt3 port. Windows 2000 enviroment, locally would be net use lpt3: \\server\printer /persistent:yes now how would i do on a remote machine?

MCR
LVL 1
mrochacAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David LeeCommented:
If you have administrative rights on all the computers, then you can use PSEXEC from Sysinternals (http://www.sysinternals.com/ntw2k/freeware/psexec.shtml).  It allows you to execute commands on remote machines.  And if you need to do this on a number of machines, then you could script the execution - running through a loop of machine names issuing the PSEXEC command for each.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mrochacAuthor Commented:
Exacly what i wanted, one more ? do you know how to find out what printers are installed locally?

MCR
0
David LeeCommented:
Yes.  Here's a simple script (VBScript) that uses WMI (Windows Management Instrumentation) to return the details of all the installed printers on the local computer.  If you have adequate rights you can use this script to get the details from a remote computer.  To do that simply change

    strComputer = "."

to
 
    strComputer = "SomeComputerName"

Save the script below into a file ending with .vbs, then run it using CScript.  If you use WScript instead of CScript, then each Wscript.Echo command will create its own dialog-box, which is a real pain.

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Printer",,48)
For Each objItem in colItems
    Wscript.Echo "Attributes: " & objItem.Attributes
    Wscript.Echo "Availability: " & objItem.Availability
    Wscript.Echo "AveragePagesPerMinute: " & objItem.AveragePagesPerMinute
    Wscript.Echo "Capabilities: " & objItem.Capabilities
    Wscript.Echo "CapabilityDescriptions: " & objItem.CapabilityDescriptions
    Wscript.Echo "Caption: " & objItem.Caption
    Wscript.Echo "ConfigManagerErrorCode: " & objItem.ConfigManagerErrorCode
    Wscript.Echo "ConfigManagerUserConfig: " & objItem.ConfigManagerUserConfig
    Wscript.Echo "CreationClassName: " & objItem.CreationClassName
    Wscript.Echo "DefaultPriority: " & objItem.DefaultPriority
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "DetectedErrorState: " & objItem.DetectedErrorState
    Wscript.Echo "DeviceID: " & objItem.DeviceID
    Wscript.Echo "DriverName: " & objItem.DriverName
    Wscript.Echo "ErrorCleared: " & objItem.ErrorCleared
    Wscript.Echo "ErrorDescription: " & objItem.ErrorDescription
    Wscript.Echo "HorizontalResolution: " & objItem.HorizontalResolution
    Wscript.Echo "InstallDate: " & objItem.InstallDate
    Wscript.Echo "JobCountSinceLastReset: " & objItem.JobCountSinceLastReset
    Wscript.Echo "LanguagesSupported: " & objItem.LanguagesSupported
    Wscript.Echo "LastErrorCode: " & objItem.LastErrorCode
    Wscript.Echo "Location: " & objItem.Location
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "PaperSizesSupported: " & objItem.PaperSizesSupported
    Wscript.Echo "PNPDeviceID: " & objItem.PNPDeviceID
    Wscript.Echo "PortName: " & objItem.PortName
    Wscript.Echo "PowerManagementCapabilities: " & objItem.PowerManagementCapabilities
    Wscript.Echo "PowerManagementSupported: " & objItem.PowerManagementSupported
    Wscript.Echo "PrinterPaperNames: " & objItem.PrinterPaperNames
    Wscript.Echo "PrinterState: " & objItem.PrinterState
    Wscript.Echo "PrinterStatus: " & objItem.PrinterStatus
    Wscript.Echo "PrintJobDataType: " & objItem.PrintJobDataType
    Wscript.Echo "PrintProcessor: " & objItem.PrintProcessor
    Wscript.Echo "SeparatorFile: " & objItem.SeparatorFile
    Wscript.Echo "ServerName: " & objItem.ServerName
    Wscript.Echo "ShareName: " & objItem.ShareName
    Wscript.Echo "SpoolEnabled: " & objItem.SpoolEnabled
    Wscript.Echo "StartTime: " & objItem.StartTime
    Wscript.Echo "Status: " & objItem.Status
    Wscript.Echo "StatusInfo: " & objItem.StatusInfo
    Wscript.Echo "SystemCreationClassName: " & objItem.SystemCreationClassName
    Wscript.Echo "SystemName: " & objItem.SystemName
    Wscript.Echo "TimeOfLastReset: " & objItem.TimeOfLastReset
    Wscript.Echo "UntilTime: " & objItem.UntilTime
    Wscript.Echo "VerticalResolution: " & objItem.VerticalResolution
    Wscript.Echo ""
Next
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 2000

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.