Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Object Required Error

449 views
Skip to first unread message

Joseph Litherland

unread,
Mar 19, 2003, 3:28:53 PM3/19/03
to
When trying to run a script on a Windows 2000 SP3 server, we get the
following error below:

Command typed in a command-line window to list printers on the local server:

cscript prnmgr.vbs -l

Error we get:

Unable to list printers, error code: 0x1A8. Object Required.

We get the same error when we try run a different script "cscript clone.vbs"

We have MS Windows Script Host Version 5.6.


Ray at work

unread,
Mar 19, 2003, 3:45:20 PM3/19/03
to
Code and line number of error?

Ray at work

"Joseph Litherland" <jose...@hotmail.com> wrote in message
news:eAa0pYl7...@TK2MSFTNGP10.phx.gbl...

Joseph Litherland

unread,
Mar 19, 2003, 4:50:20 PM3/19/03
to
Forgive me, I'm not a vbasic programmer although I know how to program in
visual NWN script. I'm not sure how to answer your question. All I did was
type the command at the C prompt in a command line window, hit the Return
key, and the reply we get at the next C prompt is "Unable to list printers,
error code: 0x1A8. Object Required." It looks like this:

(What I Type)
c:\cscript prnmgr.vbs -l

(What we get back)
c:\Unable to list printers, error code: 0x1A8. Object Required.

If you want me to list the whole code source of prnmgr.vbs, that would take
a couple pages. We get prnmgr.vbs from the Windows 2000 resource kit (more
info at
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/columns/p
rofwin/pw0102.asp ). There is an example of a command line using prnmgr.vbs
at the page. The command line switch "-l" we are using above just makes the
prnmgr.vbs list the printers that the local server has.

"Ray at work" <r...@work.spam> wrote in message
news:O8jH0hl7...@TK2MSFTNGP12.phx.gbl...

Ray at work

unread,
Mar 19, 2003, 5:06:14 PM3/19/03
to
Oh, I didn't realize this was a script from the Reskit. Let me see if I
have it... I do. It works fine for me. There's 734 lines in that script.
Damn. Nothing gives you a line number, huh? What OS are you running this
on? It seems that the only objects that are created are
PrintMaster.PrintMaster and Printer.Printer. Whatever they are...

What OS? Service pack level? When I run this on NT4 SP6a, I get the same
error.

Ray at work


"Joseph Litherland" <jose...@hotmail.com> wrote in message

news:eaRtKGm7...@TK2MSFTNGP10.phx.gbl...

Torgeir Bakken (MVP)

unread,
Mar 19, 2003, 5:11:54 PM3/19/03
to
Joseph Litherland wrote:

> When trying to run a script on a Windows 2000 SP3 server, we get the
> following error below:
>
> Command typed in a command-line window to list printers on the local server:
>
> cscript prnmgr.vbs -l
>
> Error we get:
>
> Unable to list printers, error code: 0x1A8. Object Required.

Hi

prnmgr.vbs -l works ok for me (Win2k SP2).


Make a copy of the file, and substitute all
on error resume next
with
'on error resume next


Run the script again and see what line the error is at.


I guess you will get this result:

F:\>cscript F:\prnmgr.vbs -l
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.

F:\prnmgr.vbs(307, 5) Microsoft VBScript runtime error: ActiveX component
can't create object: 'PrintMaster.PrintMaster.1'


If you do, I have no idea of how you can "repair" PrintMaster.PrintMaster.1 (I
would think it comes as a part of the OS, and it works ok on my computer).

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


Ray at work

unread,
Mar 19, 2003, 5:17:39 PM3/19/03
to
Perhaps try this at the command prompt:

regsvr32 C:\PROGRA~1\RESOUR~1\prnadmin.dll

(Assuming your system drive is C, and you installed the reskit at the
default location.)

Ray at work


"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message
news:3E78EB29...@hydro.com...

Torgeir Bakken (MVP)

unread,
Mar 19, 2003, 6:10:00 PM3/19/03
to
Ray at work wrote:

> Perhaps try this at the command prompt:
>
> regsvr32 C:\PROGRA~1\RESOUR~1\prnadmin.dll
>
> (Assuming your system drive is C, and you installed the reskit at the
> default location.)

Ahh, yes, if I unregister the prnadmin.dll, I get the error that Joseph got:

"Unable to list printers, error: 0x1A8. Object required"

Joseph Litherland

unread,
Mar 20, 2003, 4:28:31 PM3/20/03
to
That fixed the problem! We needed to register the dll. Thank you both very
very much for all your help! We truly appreciate the troubleshooting and
assistance you both provided.

Joseph Litherland
Network System Administrator
VA

"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message

news:3E78F8C8...@hydro.com...

0 new messages