User permissions for "rundll32 printui.dll,PrintUIEntry /Sr

Posted on 2005-04-14
Last Modified: 2012-05-05
The following line:
rundll32 printui.dll,PrintUIEntry /Sr /n "OKIPAGE 10i" /a "\\Server1\E\My Documents\Databases\Contact Envelope Primary.ptr"
works fine as an administrator but gives a "cannot complete the operation" error as a user.  What permission needs to be set, where do I find it and can I set it from MSAccess VB to give the users permission to run the above line?
Question by:thenelson

    Expert Comment

    I think you had better to ask it into Programming tab.
    But MS Access VB are not like VB. Something there is some difference. So maybe just check if there is other way to execute your line.

    Did you tries this on many OS? Maybe just a sharing problem from Server1.

    Good Luck

    LVL 6

    Expert Comment

    To install printers, a user needs to be at minimum, a member of the Power Users group.

    I doubt you can set it from MSAccess, at least while the user is logged in as a normal User.  You'd have to log in as an administrator, or Right-Click, Run As, on the Computer Management console and run it as a local admin to add them to the Power Users group.  If you're on a domain, remember it's Power User rights on the local computer that they need, not on the domain.

    LVL 39

    Author Comment

    It is not a sharing problem with server1.  rundll32 printui.dll,PrintUIEntry /Ss /n "OKIPAGE 10i" /a "\\Server1\E\My Documents\Databases\Contact Envelope Primary.ptr" which writes the printer settings to the folder works fine.  I can copy the file as a user.  

    I am not installing a printer rundll32 printui.dll,PrintUIEntry /Sr /n "OKIPAGE 10i" /a "\\Server1\E\My Documents\Databases\Contact Envelope Primary.ptr" copies printer settings from the named file.

    rundll32 printui.dll,PrintUIEntry /? will pop up a printer user interface listing all the available commands.
    LVL 39

    Author Comment

    I am making this question a pointer to: and I will request this question be deleted when the answer is posted in  Please make any additional comments in that question.  Thank you.

    I have just learned the following from
    "A pointer question should state the title, number of points offered, and a brief summary of the original question. Make the pointer question worth the minimum number of points. To make it absolutely clear, include a statement like "Please direct all your comments to the original question" and then provide a link to that question. The pointer question should be deleted (and your points refunded) when you accept an answer in your original question."
    LVL 39

    Author Comment

    WELL, I FIGURED OUT HOW TO SOLVE THE PROBLEM!  I just added the switch "u" at the end of the  rundll32 printui.dll,PrintUIEntry /Sr  and /Ss lines.  Not only does it solve the problem but it also makes the saved file smaller and the commands run faster!

    Thanks to all for your responses.  I now have a system for Access (or any other VB project) that can store which printer and printer settings to use for a form, report or command.  Change the printer and settings, print then change it back.  If anyone would like the code for it let me know.

    Accepted Solution

    Closed, 500 points refunded.
    Community Support Moderator

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Just about everyone has an old PC laying around.  Ask anyone in the IT industry, whether they are a professional or play in it as a hobby.  From outdated Desktops to cheap "throwaway" laptops, they are all around and not as hard to "fix up" as you m…
    Sometimes a user will call me frantically, explaining that something has gone wrong and they have tried everything (read - they have messed it up more and now need someone to clean up) and it still does no good, can I help them?!  Usually the standa…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now