• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1664
  • Last Modified:

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

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?
0
thenelson
Asked:
thenelson
1 Solution
 
chouprouteCommented:
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

Marco
0
 
salvagbfCommented:
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.

-Bernie
0
 
thenelsonAuthor Commented:
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.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
thenelsonAuthor Commented:
I am making this question a pointer to: http://www.experts-exchange.com/Databases/MS_Access/Q_21388599.html and I will request this question be deleted when the answer is posted in http://www.experts-exchange.com/Databases/MS_Access/Q_21388599.html.  Please make any additional comments in that question.  Thank you.

I have just learned the following from http://www.experts-exchange.com/help.jsp#hi262:
"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."
0
 
thenelsonAuthor Commented:
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.
0
 
PashaModCommented:
Closed, 500 points refunded.
PashaMod
Community Support Moderator
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now