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
"Joseph Litherland" <jose...@hotmail.com> wrote in message
news:eAa0pYl7...@TK2MSFTNGP10.phx.gbl...
(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...
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...
> 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
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...
> 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
Network System Administrator
VA
"Torgeir Bakken (MVP)" <Torgeir.B...@hydro.com> wrote in message
news:3E78F8C8...@hydro.com...