Re: Problem "Getting" an object
From: Peter Falz (pf.ms.news_at_asp-solutions.de)
Date: 01/11/05
- Previous message: vish: "Re: Problem "Getting" an object"
- In reply to: vish: "Re: Problem "Getting" an object"
- Next in thread: vish: "Re: Problem "Getting" an object"
- Reply: vish: "Re: Problem "Getting" an object"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 11 Jan 2005 18:35:15 +0100
Hi vish,
mmh, please post your code.
Without the code, nobody here can help you, also not the
"Magic 8ball" ;-)
Bye
Peter
"vish" <itsmedude@gmail.com> schrieb im Newsbeitrag news:1105463734.062384.320580@f14g2000cwb.googlegroups.com...
> Hi,
> I have a question regarding the WMI scripts. I've written WMI code
> integrated into ASP. What it does is that it connects to the remote
> computers in the lab and gets the whole inventory list (it gets the
> info about each computer like hard disk capacity, free space, OS,
> version etc..etc...). Everything works fine for me but it takes too
> long to give me the result. For example, I have around 80 machines in
> the lab and it takes around 9 minutes to give me the result. Is there
> any other way that I can reduce the time and get the response quicker.
>
> Any help is appreciated.
>
> Thanks,
> vish.
>
> Peter Falz wrote:
> > Hi TroubleMan,
> >
> > "TroubleMan" <TroubleMan@discussions.microsoft.com> schrieb im
> Newsbeitrag
> > news:51845C27-C3E1-47A2-8D5C-DB36A4AE424B@microsoft.com...
> > > Not sure if getting an object by any other property besides the Key
> property
> > > is legal but here is my question
> > >
> > > ***Why does this work
> > > Set objWMI = GetObject("winMgmts:")
> > > Set refService = objWMI.Get("Win32_Service.Name='Spooler'")
> > > With refService
> > > Wscript.Echo .Caption
> > > Wscript.Echo .State
> > > End With
> > >
> > > ***But this does not
> > > Set objWMI = GetObject("winMgmts:")
> > > Set refService = objWMI.Get("Win32_Service.DisplayName='Print
> Spooler'")
> > Maybe it is not named "Print Spooler". I cannot test this with "Print
> Spooler"
> > because in german it is named as "Druckwarteschlange", but i've
> tested this with this
> > word in CIM Studio and it works fine.
> >
> > Try this:
> > ...
> > Set refService = objWMI.Get("Win32_Service.Name='Spooler'")
> > With refService
> > Wscript.Echo .DisplayName
> > ...
> >
> > Use the output of this property and it should wok also for you.
> > Set refService =
> objWMI.Get("Win32_Service.DisplayName='[DisplayName]'")
> >
> > HTH
> >
> > Bye
> > Peter
>
- Previous message: vish: "Re: Problem "Getting" an object"
- In reply to: vish: "Re: Problem "Getting" an object"
- Next in thread: vish: "Re: Problem "Getting" an object"
- Reply: vish: "Re: Problem "Getting" an object"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|