Setting Default Printer

R

Ray Gibson

I use prnmngr.vbs to setup all printers for users who log in to a Win2k3
Terminal Server.

It works great. However I now need to use it to set a default printer. It
looks like this:

cscript prnmngr.vbs -ac -p \\onyx\HP_4000_Trw ::::::::This works!!!
Adds connection to the printer

cscript prnmngr.vbs -t -p \\onyx\HP_4000_Trw :::::::::This should
work but doesnt. It's supposed to set the printer as the default:
It responds with this error:

prnmngr.vbs (818, 9) SwBemServiceEx: Not found

I beleive that my syntax is correct... ??? Does anyone have any ideas?

Thanks in advanc.
Ray
 
A

Alan Morris\(MSFT\)

You need to specify the printer name rather than the sharename when setting
the default. You can also use the printer name when creating the
connection. Be sure to wrap the strings with spaces in ""

prnmngr -ac -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Added printer connection \\server\dec


prnmngr -t -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

E:\ADS1044\system32\prnmngr.vbs(818, 9) SWbemServicesEx: Not found


prnmngr -t -p "\\server\DEC PrintServer 17/600"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

The default printer is now \\server\DEC PrintServer 17/600
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.
 
R

Ray Gibson

Thanks for the response Alan...

It makes sense but I must still have something wrong:

On the server (onyx) the printer is named: HP 4000t TRW and it's shared as
HP_4000_TRW

cscript prnmngr.vbs -t -p "\\onyx\HP_4000_TRW HP 4000t TRW"

This still yeilds me the same result... Not found.



Alan Morris(MSFT) said:
You need to specify the printer name rather than the sharename when
setting
the default. You can also use the printer name when creating the
connection. Be sure to wrap the strings with spaces in ""

prnmngr -ac -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Added printer connection \\server\dec


prnmngr -t -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

E:\ADS1044\system32\prnmngr.vbs(818, 9) SWbemServicesEx: Not found


prnmngr -t -p "\\server\DEC PrintServer 17/600"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

The default printer is now \\server\DEC PrintServer 17/600
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no
rights.

Ray Gibson said:
I use prnmngr.vbs to setup all printers for users who log in to a Win2k3
Terminal Server.

It works great. However I now need to use it to set a default printer. It
looks like this:

cscript prnmngr.vbs -ac -p \\onyx\HP_4000_Trw ::::::::This works!!!
Adds connection to the printer

cscript prnmngr.vbs -t -p \\onyx\HP_4000_Trw :::::::::This should
work but doesnt. It's supposed to set the printer as the default:
It responds with this error:

prnmngr.vbs (818, 9) SwBemServiceEx: Not found

I beleive that my syntax is correct... ??? Does anyone have any ideas?

Thanks in advanc.
Ray
 
A

Alan Morris\(MSFT\)

From this post
On the server (onyx) the printer is named: HP 4000t TRW

I would assume you need to specify this. Am I missing something?

cscript prnmngr.vbs -t -p "\\onyx\HP 4000t TRW"


--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.

Ray Gibson said:
Thanks for the response Alan...

It makes sense but I must still have something wrong:

On the server (onyx) the printer is named: HP 4000t TRW and it's shared as
HP_4000_TRW

cscript prnmngr.vbs -t -p "\\onyx\HP_4000_TRW HP 4000t TRW"

This still yeilds me the same result... Not found.



Alan Morris(MSFT) said:
You need to specify the printer name rather than the sharename when
setting
the default. You can also use the printer name when creating the
connection. Be sure to wrap the strings with spaces in ""

prnmngr -ac -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Added printer connection \\server\dec


prnmngr -t -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

E:\ADS1044\system32\prnmngr.vbs(818, 9) SWbemServicesEx: Not found


prnmngr -t -p "\\server\DEC PrintServer 17/600"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

The default printer is now \\server\DEC PrintServer 17/600
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no
rights.

Ray Gibson said:
I use prnmngr.vbs to setup all printers for users who log in to a Win2k3
Terminal Server.

It works great. However I now need to use it to set a default printer. It
looks like this:

cscript prnmngr.vbs -ac -p \\onyx\HP_4000_Trw ::::::::This works!!!
Adds connection to the printer

cscript prnmngr.vbs -t -p \\onyx\HP_4000_Trw :::::::::This should
work but doesnt. It's supposed to set the printer as the default:
It responds with this error:

prnmngr.vbs (818, 9) SwBemServiceEx: Not found

I beleive that my syntax is correct... ??? Does anyone have any ideas?

Thanks in advanc.
Ray
 
R

Ray Gibson

I got it to work this way...

cscript prnmngr.vbs -t -t "\\onyx\HR 4000t TRW"

Thanks!


Ray Gibson said:
Thanks for the response Alan...

It makes sense but I must still have something wrong:

On the server (onyx) the printer is named: HP 4000t TRW and it's shared
as HP_4000_TRW

cscript prnmngr.vbs -t -p "\\onyx\HP_4000_TRW HP 4000t TRW"

This still yeilds me the same result... Not found.



Alan Morris(MSFT) said:
You need to specify the printer name rather than the sharename when
setting
the default. You can also use the printer name when creating the
connection. Be sure to wrap the strings with spaces in ""

prnmngr -ac -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Added printer connection \\server\dec


prnmngr -t -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

E:\ADS1044\system32\prnmngr.vbs(818, 9) SWbemServicesEx: Not found


prnmngr -t -p "\\server\DEC PrintServer 17/600"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

The default printer is now \\server\DEC PrintServer 17/600
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no
rights.

Ray Gibson said:
I use prnmngr.vbs to setup all printers for users who log in to a Win2k3
Terminal Server.

It works great. However I now need to use it to set a default printer. It
looks like this:

cscript prnmngr.vbs -ac -p \\onyx\HP_4000_Trw ::::::::This works!!!
Adds connection to the printer

cscript prnmngr.vbs -t -p \\onyx\HP_4000_Trw :::::::::This should
work but doesnt. It's supposed to set the printer as the default:
It responds with this error:

prnmngr.vbs (818, 9) SwBemServiceEx: Not found

I beleive that my syntax is correct... ??? Does anyone have any ideas?

Thanks in advanc.
Ray
 
A

Alan Morris\(MSFT\)

great. This forum is a good place to find answers. I know not everything
is resolved completely but there are many knowledgeable people who can point
others in the right direction.

--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no rights.

Ray Gibson said:
I got it to work this way...

cscript prnmngr.vbs -t -t "\\onyx\HR 4000t TRW"

Thanks!


Ray Gibson said:
Thanks for the response Alan...

It makes sense but I must still have something wrong:

On the server (onyx) the printer is named: HP 4000t TRW and it's shared
as HP_4000_TRW

cscript prnmngr.vbs -t -p "\\onyx\HP_4000_TRW HP 4000t TRW"

This still yeilds me the same result... Not found.



Alan Morris(MSFT) said:
You need to specify the printer name rather than the sharename when
setting
the default. You can also use the printer name when creating the
connection. Be sure to wrap the strings with spaces in ""

prnmngr -ac -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

Added printer connection \\server\dec


prnmngr -t -p \\server\dec
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

E:\ADS1044\system32\prnmngr.vbs(818, 9) SWbemServicesEx: Not found


prnmngr -t -p "\\server\DEC PrintServer 17/600"
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

The default printer is now \\server\DEC PrintServer 17/600
--
Alan Morris
Windows Printing Team
Search the Microsoft Knowledge Base here:
http://support.microsoft.com/default.aspx?scid=fh;[ln];kbhowto

This posting is provided "AS IS" with no warranties, and confers no
rights.

I use prnmngr.vbs to setup all printers for users who log in to a Win2k3
Terminal Server.

It works great. However I now need to use it to set a default printer.
It
looks like this:

cscript prnmngr.vbs -ac -p \\onyx\HP_4000_Trw ::::::::This
works!!!
Adds connection to the printer

cscript prnmngr.vbs -t -p \\onyx\HP_4000_Trw :::::::::This
should
work but doesnt. It's supposed to set the printer as the default:
It responds with this error:

prnmngr.vbs (818, 9) SwBemServiceEx: Not found

I beleive that my syntax is correct... ??? Does anyone have any ideas?

Thanks in advanc.
Ray
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top