Re: Windows Server 2008 and redirected printer names
From the MSDN documentation for the RenamePrinter method:
Client Requires Windows Vista or Windows XP.
Server Requires Windows Server 2008 or Windows Server 2003.
MOF Declared in Cimwin32.mof.
DLL Requires Cimwin32.dll.
Namespace Defined in \root\cimv2.
So yes, it should work on W2008.
But your script needs to impersonate a user account with at least
Power User rights to be able to rename the redirected printer.
I'd post to an MSDN forum, you're much more likely to get help
there.
http://social.msdn.microsoft.com/Forums/en-us/categories/
_________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
TS troubleshooting:
http://ts.veranoest.net
___ please respond in newsgroup, NOT by private email ___
"Saucer Man" <saucerman@nospam.com> wrote on 27 okt 2008 in
microsoft.public.windows.terminal_services:
> Does anyone know if RenamePrinter works on Server 2008? I can't
> seem to get it to rename a printer.
>
>
> "Saucer Man" <saucerman@nospam.com> wrote in message
> news:4905d01b$0$5754$cc2e38e6@news.uslec.net...
>>I tried the first link you sent but it didn't help. I will try
>>to ask the Scripting Guys from the second link. Thanks!
>>
>> "Vera Noest [MVP]" <vera.noest@remove-this.hem.utfors.se> wrote
>> in message
>> news:Xns9B41D66CBB7EFveranoesthemutforsse@207.46.248.16...
>>> No, I haven't. But have you tried this:
>>>
>>> For script code examples, see WMI Tasks for Scripts and
>>> Applications and the TechNet ScriptCenter Script Repository.
>>>
>>> http://msdn.microsoft.com/en-us/library/aa394585(VS.85).aspx
>>> http://go.microsoft.com/fwlink/?LinkId=46710
>>> _________________________________________________________
>>> Vera Noest
>>> MCSE, CCEA, Microsoft MVP - Terminal Server
>>> TS troubleshooting: http://ts.veranoest.net
>>> ___ please respond in newsgroup, NOT by private email ___
>>>
>>> "Saucer Man" <saucerman@nospam.com> wrote on 24 okt 2008 in
>>> microsoft.public.windows.terminal_services:
>>>
>>>> Thanks for this info Vera. The Microsoft link doesn't
>>>> exactly show you how to write the script to remove the
>>>> session number for all the printers. Do you have this code?
>>>>
>>>>
>>>> "Vera Noest [MVP]" <vera.noest@remove-this.hem.utfors.se>
>>>> wrote in message
>>>> news:Xns9B40D92AB5B84veranoesthemutforsse@207.46.248.16...
>>>>> Check this out:
>>>>>
>>>>> Can I remove the session number from the redirected printer
>>>>> name?
>>>>> http://ts.veranoest.net/ts_faq_printing.htm#sessionid_in_prin
>>>>> ter name
>>>>>
>>>>> _________________________________________________________
>>>>> Vera Noest
>>>>> MCSE, CCEA, Microsoft MVP - Terminal Server
>>>>> TS troubleshooting: http://ts.veranoest.net
>>>>> ___ please respond in newsgroup, NOT by private email ___
>>>>>
>>>>> "Saucer Man" <saucerman@nospam.com> wrote on 23 okt 2008 in
>>>>> microsoft.public.windows.terminal_services:
>>>>>
>>>>>> Is there a way to prevent the redirected printers in a
>>>>>> client session from displaying a number which changes after
>>>>>> the word "redirected"? This is causing an issue with
>>>>>> applications that remember the name of the last printer
>>>>>> used. The application might remember "redirected 2" and
>>>>>> the next time a client connects the print job fails because
>>>>>> it is now called redirected 3".