Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Install Local Printer on XP Home boxes for all users 1

Status
Not open for further replies.

ghloid

IS-IT--Management
Mar 11, 2002
85
0
0
US
Hey all,

I've been searching for an answer on this one, but it appears I can't find anything real specific to LOCAL printers (found some good info on network ones though).

I have about 7 machines which run XP Home addition (I know, it's not XP Pro, but it kind of fits the forum). They have "Limited User" accounts on them (and I want to keep them that way). They have USB printers though, and I'm seeing a problem when they reconnect the printers to the machines after I've updated them. If their account has admin privleges, the printer gets installed no prob. However as a limited user, it states that it needs the admin privs when the printer USB cable is reconnected. This is weird, because I DO install the printer when I have the machines back at my office with their account as an admin. I then reinstate the account to limited privleges when I'm done. When they take the machines back home though, they get the same prompt when they hook up their printers. I should note, these are EXACTLY the same type of USB printers (HP 5600's) that all have. It must be something with a different hardware ID or something.

At any rate, I'm working with a little executable I found called "lsrunas" (found it here:
With this, you can create some command prompt stuff to run as a specific user (with a pre-provided password). It works great for some programs. I'm trying to figure out how I can perhaps use that to create a batch file which will change their account to "admin" status (all in a hidden DOS window), then they can re log on with the proper privleges, and they should have no probs when they connect their printers. I can send them an additional batch file which can reinstate the privleges to limited again once they're done. I'm looking specifically for some type of command line references to change user account info. Or to be more specific, perhaps the particular executable to use with this "lsrunas" command that will open up the users and passwords console and somehow change their account to admin status. Hope that's not too tall of an order. Perhaps something with the "net use" commands???

I should note, these are pretty illiterate users who will just click the things I tell them to without question. They will never even know they have admin privleges if this all works out right.

Anyway, sorry for the big message, but I'm wondering if someone can help with this one.
 
Billiant! Thanks for the quick response bcastner (as always).

I'll have some time to look it over later tonight and tomorrow. I'll try to post my results back.

Thanks!
 
bcastner,

Thanks again for that help! It is a step in the right direction, but since I don't have the user's machines in front of me now, I have to kind of figure out a way to "automatically" register their logon as an admin (without them using the machine's admin account to do this).

I used the Ntrights utility (VERY NICE), and in conjunction with the "lsrunas" command, you can create a very nice little batch file that will in fact give the limited user account the SeLoadDriverPrivilege successfully. I used:

lsruans /user:eek:wner /password:password /domain:Mydomain /command:"ntrights +r SeLoadDriverPrivilege -u grader" /runpath:c:\

Yep, a simple little one liner like that DID get the privilege passed to the account when they were logged on as their "limited user" account. However, I could see from the second link you have above on "printer installations with Win XP", that you STILL need to be an admin (since this is XP Home addition, there is no Power User groups).

I've looked over the ntrights utility to see if there's some way you can change a user account to another type, but that doesn't seem to be an option.

The whole issue here is that the printer and it's drivers ARE in fact installed on the computer for them already (installed under the owner account), it's just when they plug the USB printer into the machine logged on as their account, it needs to reload the drivers for some stupid reason. Not sure why. After they've done that once, they won't have to worry about it again. But, I'd sure like to find a way around them using the admin logon just so they can change their account to admin for one stupid driver load. Then I'm REALLY trusting the fact that they'll change it back to "limited user" again. Even if they do, they'll have the admin logon and password, so they can change it back whenever they like. Grrrr! Frustrating.

Anyway, if you have any more ideas, I'd love to hear em.

Thanks!!
 
Thanks again for the help there bcastner. I haven't had a chance to post anything on this till now, so sorry about the delay.

Your suggestion worked with the help of a little more code work. I still had to change the user to an admin level so the printer could be installed correctly on their machine under their account. I accomplished this using a good ol' fashioned "net" command. You can use that command with the localgroup switch. I used:

net localgroup administrators grader /add

for instance which put the grader account in the admin group. Using the lsrunas (or your Runasuser suggestion would probably work too), you can run this command as a batch file, which goes on pretty much without the user's notice. I tied in some of your suggestions on using the printui.dll to delete some of the old printer junk on their computer (from failed installation attempts...long story), also using the lsrunas command, and that did the trick.

For the record, this whole printer behavior is something I've seen before. You install the drivers on as an admin user, yet when another user logs on with limited privileges, they have to reinstall the driver for some reason. Doesn't make much sense, but I suppose it has something to do with the fact that the printer is USB, and it's being recognized for the first time under another user. Maybe.

Anyway, thanks again for the help. I'm going to use the printui.dll commands on some other projects now too. Very useful!
 
You are very welcome.
Best regards,
Bill Castner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top