|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Windows 2003 Adding printerport and printerI have registered the prnadm.dll file and used the objects to create a printer TCP/IP port and printer on a windows 2003 server. Problem is that the user doesn't have sufficient privileges to execute the objects whoam create the TCP/IP port and printer on the server. So I am looking for a way to set specific credentials when creating the object in vbs. set oPort = CreateObject("Port.Port.1") set oMaster = CreateObject("PrintMaster.PrintMaster.1") oMaster.PortAdd oPort ... How can I have the above created objects set with specific credentials so it works with an account with enough priviliges. Kind Regards, Silent-One *** Sent via Developersdex http://www.developersdex.com *** It is possible to do something like this, but, AFAIK, not from VBScript.
VBScript doesn't have the ability to create objects using an alternate principle. At least not without using a custom written component to act as a proxy... -- <i><b>RageInTheMachine9532</b></i><font size="-2"> "<i>...a pungent, ghastly, stinky piece of cheese!</i>" <b>-- The Roaming Gnome</b></font>Show quoteHide quote "Jo Becaus" wrote: > > > Dear, > > I have registered the prnadm.dll file and used the objects to create a > printer TCP/IP port and printer on a windows 2003 server. > > Problem is that the user doesn't have sufficient privileges to execute > the objects whoam create the TCP/IP port and printer on the server. > > So I am looking for a way to set specific credentials when creating the > object in vbs. > > set oPort = CreateObject("Port.Port.1") > set oMaster = CreateObject("PrintMaster.PrintMaster.1") > oMaster.PortAdd oPort ... > > How can I have the above created objects set with specific credentials > so it works with an account with enough priviliges. > > Kind Regards, Silent-One > > > *** Sent via Developersdex http://www.developersdex.com *** >
Iterative GetObject
get list of file names in a directory Is any device connected to COM1 port Division by Zero Error - Help Urgent InStr search counter Merge array in VB Controlling location of form within form Odd sequencin of window display How to write a PDF file from Visual Basic ? How to monopolize Windows in vb6 |
|||||||||||||||||||||||