Re: printuientry

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Bruce Sanderson (bsanders_at_junk.junk)
Date: 08/22/04


Date: Sun, 22 Aug 2004 14:56:52 -0700

That message is sort a generic message that is the response to most failures
of PrintUIEntry. It tries to give you a hint about what might be wrong, but
does not necessarily identify what actually is wrong.

My test show that an ordinary user can use the "rundll32
printui,PrintUIEntry /y /n printername" command successfully, so presumably
you could put it into a logon script. Most of the other available functions
(including /in) require the user to be an administrator on the targeted
computer. The /y function (set default printer) will fail (with the message
you describe) if the named printer does not exist (e.g. name spelt wrong).

Actions taken on the print client computer (e.g. /y - set default printer or
/ga - add a printer for all users - see
http://members.shaw.ca/bsanders/NetPrinterAllUsers.htm) do not require
administrative rights and permissions on the print server computer ("the
machine with the printer").

-- 
Bruce Sanderson  MVP
It is perfectly useless to know the right answer to the wrong question.
"panda" <sam.bixby@wolfreton.eril.uk> wrote in message 
news:PiCdnYmx3pMfxLXcSa8jmA@karoo.co.uk...
>I have just remebered one problem I had, when I tried running this, an 
>error
> message appeared saying that the printer was no longer on the server. This
> was true whether the batch file was run as a logon script or as the user
> when logged on. The error did not occur as a network administrator. I 
> tried
> making the user a local administrator with no luck. do they also need to 
> be
> administrator on the machine with the printer? is there another permission 
> I
> am missing? This was the reason I was trying to set permission for 
> everyone
> using a system logon.
>
> Thanks
>
> Panda
>
>
> "Bruce Sanderson" <Bruce.Sanderson@junk.junk> wrote in message
> news:uMY6uOwhEHA.632@TK2MSFTNGP12.phx.gbl...
>> 1. "Default printer" is a per user setting, not a per computer setting, 
>> so
>> it may not make sense to set it in a "startup" script (as opposed to a
>> "logon" script).
>>
>> 2. I've tried several variations on the command syntax and can not get it
> to
>> work remotely.  When the command is run locally (to take action on the
> same
>> computer that the command is initiated from), there is no need to use the
> /c
>> parameter.
>>
>> 3. the syntax that works for the currently logged on user locally is:
>>
>>    rundll32 printui,PrintUIEntry /y /n printername
>>
>> where printername is the name that is on the General tab of the printer's
>> properties.  If this name has spaces in it, enclose printername in double
>> quotes ("printername").
>>
>> 4. the /in function is for adding a network printer connection.  If the
>> printer is already defined on a "local port", then the printer (although
> it
>> is actually physically connected to another computer), is, by definition,
> a
>> Local Printer.  True Network Printers do not have local ports.  See 
>> :port"
>> and "printer" at http://members.shaw.ca/bsanders/Glossary.htm.
>>
>> --
>> Bruce Sanderson MVP
>>
>> It's perfectly useless to know the right answer to the wrong question.
>>
>>
>> "panda" <sam_bixby@hotmail.com> wrote in message
>> news:2bbf249f.0408200050.3841112c@posting.google.com...
>> >I am trying to add set a printer as default using the following
>> > command...
>> >
>> > RUNDLL32 PRINTUI.DLL,PrintUIEntry /y /in /n "printer" /c\\computer
>> >
>> > the complication is that the printer already exists on this computer,
>> > it is using a local port , but is physically attached to a different
>> > network computer.
>> >
>> > so my questions are;
>> >
>> > do i need to included the name of the computer that the printer is
>> > attached to, or can i just use the printers sharename.
>> >
>> > is the syntax of the command correct?
>> >
>> > is there any reason why this shouldnt work when set as a startup
>> > script on the computer?
>> >
>> > sam.bixby@wolfreton.removeme.eril.net
>>
>>
>
> 


Relevant Pages

  • Re: printuientry
    ... If the printer was created with a "Local Port", it will show up in the ... open a command prompt and issue the commands: ... > When im logged on as network administrator, ...
    (microsoft.public.win2000.printing)
  • Re: printuientry
    ... "logon" script). ... I've tried several variations on the command syntax and can not get it to ... printer is already defined on a "local port", ... > is there any reason why this shouldnt work when set as a startup ...
    (microsoft.public.win2000.printing)
  • Re: change PCs DNS settings to dynamic via logon scrip in Nvell environment
    ... adminidtrator details of the loacl PC on a script and the poing to the ... I am aware of this command and it does work if you save it as a batch ... Is there a way of entering all administrator credntials on a ... batch file or vb script to run and then point to the NETSH command to ...
    (microsoft.public.win2000.registry)
  • Re: Running a .bat as a local admin?????!?!?
    ... Is there a command ... that i can run in the script to run as administrator. ... The login script will run in the user context. ... You may be able to execute ...
    (microsoft.public.windows.server.general)
  • Run a script which has administrator credentials embebd, then run batch file
    ... it may alocated by a DHCP server on a PC. ... the command below, ... Is there a script that i can use where i just put the administrator ...
    (microsoft.public.windows.server.scripting)