Avoid Generic Error with WMIC

Comments

6 comments

  • Bouma, Colby

    Is your PDQ Deploy service account an admin on the target PC?

    0
    Comment actions Permalink
  • Doug Kinsey

    Yes, PDQ Deploy is an admin on the target PC.  I've tried other PCs as well, still receiving the same error.

    0
    Comment actions Permalink
  • Bouma, Colby
    1. What is the full error message?
    2. Are you using the PDQ Deploy service account when you run the command directly?
    0
    Comment actions Permalink
  • Doug Kinsey

    Running it again today did not yield any errors, but instead returned successful with no instances found.  I tested on 2 different PCs with the same result, both having 3 network printers installed.

    0
    Comment actions Permalink
  • Brigg Angus

    Are you running this as a Command step (as a file) or an Install step? If you're running it as a Command step, can you package the

    wmic printer where local=false delete

    in a .bat file and run it locally and successfully? If so, try deploying the .bat file.

    There is also another issue, and one that I think is the cause of the problem rather than the deployment method. Network printers are generally installed in a user-context, whereas we deploy packages and commands in a machine-context. You might have better results changing the Options (tab) of the step to "Run As" Logged on User, which will remove the network printers for the logged on user.

    If the printers were installed for all users, the delete command is likely going to be different.

    0
    Comment actions Permalink
  • Doug Kinsey

    You were spot on with your thought.  Both the command and the .bat file ran perfectly fine if launched from the PC itself, running as Logged On User did the trick for PDQ Deploy.  Thanks!

    0
    Comment actions Permalink

Please sign in to leave a comment.