Windows Vista Forums

Install a Printer (WMI) Access denied
  1. #1


    briklebritt Guest

    Install a Printer (WMI) Access denied

    hi,

    i got a problem here. I used a script from technet -

    http://www.microsoft.com/technet/scr....mspx?mfr=true

    Script Center Home > Script Repository > Printing > Print Servers, Queues,
    and Print Jobs

    called "Install a Printer"

    under win2003Server. each time i run the script after i created the correct
    named port and used the correct driver name, the scipt shows the message
    "access denied" with Code 80041003 at SWbemObjectEx.

    my administrator has full rights at the local security config on WMI-Control.

    i tried the script on my winXP client and it works! but not on my Server2003.

    Here is the script form technet:

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")



    Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_

    objPrinter.DriverName = "HP LaserJet 4000 Series PS"
    objPrinter.PortName = "IP_169.254.110.160"
    objPrinter.DeviceID = "ScriptedPrinter"
    objPrinter.Location = "USA/Redmond/Building 37/Room 114"
    objPrinter.Network = True
    objPrinter.Shared = True
    objPrinter.ShareName = "ScriptedPrinter"
    objPrinter.Put_


    I hope u can help. Don“t know what to do...


      My System SpecsSystem Spec

  2. #2


    BigDaddyJim Guest

    Re: Install a Printer (WMI) Access denied

    On Jun 13, 12:56*am, briklebritt
    <briklebr...@xxxxxx> wrote:

    > hi,
    >
    > i got a problem here. I used a script from technet -
    >
    > http://www.microsoft.com/technet/scr...efault.mspx?mf...
    >
    > Script Center Home > Script Repository > Printing > Print Servers, Queues,
    > and Print Jobs
    >
    > called "Install a Printer"
    >
    > *under win2003Server. each time i run the script after i created the correct
    > named port and used the correct driver name, the scipt shows the message
    > "access denied" with Code 80041003 at SWbemObjectEx.
    >
    > my administrator has full rights at the local security config on WMI-Control.
    >
    > i tried the script on my winXP client and it works! but not on my Server2003.
    >
    > Here is the script form technet:
    >
    > strComputer = "."
    > Set objWMIService = GetObject("winmgmts:" _
    > * * & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    >
    > Set objPrinter = objWMIService.Get("Win32_Printer").SpawnInstance_
    >
    > objPrinter.DriverName = "HP LaserJet 4000 Series PS"
    > objPrinter.PortName * = "IP_169.254.110.160"
    > objPrinter.DeviceID * = "ScriptedPrinter"
    > objPrinter.Location = "USA/Redmond/Building 37/Room 114"
    > objPrinter.Network = True
    > objPrinter.Shared = True
    > objPrinter.ShareName = "ScriptedPrinter"
    > objPrinter.Put_
    >
    > I hope u can help. Don“t know what to do...
    Use this as your objWMIService statement. It works...

    Set objWMIService = GetObject("winmgmts:
    {impersonationLevel=impersonate, (LoadDriver)}")

    Jim

      My System SpecsSystem Spec

Install a Printer (WMI) Access denied problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
printer access denied AJ Joslin Vista networking & sharing 1 29 May 2007
Printer access denied Chuck Davis Vista General 1 27 Mar 2007
Access is denied message when trying to access a remote printer MarkC Vista print fax & scan 1 08 Mar 2007
Printer Access Denied BigK Vista print fax & scan 7 21 Nov 2006
Printer Access denied? Donald Wilkinson Vista print fax & scan 3 18 Jun 2006