Cannot use WMI in VBScript

From: Tim (troepken@yahoo.com)
Date: 02/04/03


From: "Tim" <troepken@yahoo.com>
Date: Tue, 4 Feb 2003 10:05:51 -0800


I'm trying to simply learn VBScript from the VBScript
primer on technet, and on my XP home machine, when I run
the sample VBScript that gets free disk space from the C
drive, I get a dialog with the following:

Script: diskspace.vbs
Line: 2
Char: 1
Error: 0x80041001
Code: 80041001
Source: (null)

Now, this script runs fine on my Win2k pro machine. I
reinstalled the WMI service as per another posting, since
it didn't even show up in my services, and that now
starts, but I still get this error. The line in question
in the error is:

Set objWMIService = GetObject("winmgmts:")

So, it seems it can't connect to the service still. I
don't know if it's pertinent or not, but the WMI
Performance Adapter won't start on my machine with
a "Class not registered" error.

Any assistance is much appreciated.

Tim



Relevant Pages

  • Re: Ping Steve Yandl or other VBScript gurus
    ... post on the vbscript newsgroup and that got me going in the right direction. ... 'Run macro named createResumeFromFile, which has no arguments, and catch its ... 'Exit the script with the value of the return code from the macro/function. ... how to do what I want to do entirely in VBA or VBScript; ...
    (microsoft.public.word.vba.general)
  • Re: LDAP query information
    ... execution of the vbscript? ... The error message indicates the line number in the script, ... Dim strBase, strFilter, strAttributes, strQuery, adoRecordset ... ' Construct LDAP syntax query. ...
    (microsoft.public.windows.server.scripting)
  • Re: Thank you Richard, Paul and urkec
    ... only built-in way to communicate with the person running the script is ... It is documented in the VBScript help file Script56.chm. ... You can use the ADO and ADOX objects to analyze and manipulate an existing ... dir cmd of each folder to a text file and have my script use that file ...
    (microsoft.public.scripting.vbscript)
  • Re: Ping Steve Yandl or other VBScript gurus
    ... Steve Yandl suggested using VBScript when I asked ... I'm trying to add one small wrinkle to the script and can't figure ... The macro that I am launching from the VBScript is ... be that 'dim bWaitOnReturn' didn't define the variable as Boolean but ...
    (microsoft.public.word.vba.general)
  • Re: Thank you Richard, Paul and urkec
    ... It is documented in the VBScript help file Script56.chm. ... You can use the ADO and ADOX objects to analyze and manipulate an existing ... object browser to help those who script its VBA (like a VBScript but also ... I'm trying to create a script that will read the folder properties of the ...
    (microsoft.public.scripting.vbscript)

Loading