I was logged into a system using an ordinary user account under Windows XP and needed to create a new printer port so that I could print to an HP printer, which was on the network to which I was connected. The user account doesn't have access to add network printers, but I had a lot of applications open with ongoing work and didn't want to have to save and close everything I was working on, log off, login as the administrator, log off, log back in under the user account and reopen all the applications and files, especially since I only had a few minutes to get a document printed prior to a meeting.
Fortunately, I was able to find information on how to easily resolve my problem at Command Line Printer Control in Windows 2000 / XP. All I had to do to add a printer from the administrator account while still remaining logged into my user account was the following:
- Open Windows Explorer and navigate to C:\WINDOWS\system32.
- Right-click on cmd.exe while holding down a shift key, then select Run as.
- Select "The following user", put in the userid for the administrator account for the system, e.g. SystemName\administrator, for user name and its password, then click on OK.
At the command prompt window that opens, enter the following command:
RUNDLL32 PRINTUI.DLL,PrintUIEntry /il
That will run the Add Printer Wizard from the administrator account, allowing you to add a printer port.
Note: The capitalization of
PrintUIEntry is important.
If you don't use
PrintUIEntry, but, instead used
printUIEntry, you would get the error message below:
Error in printui.dll
/il parameter is also case sensitive.