Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object required: 'objWMIService {2,1)

Status
Not open for further replies.

gminoc01

IS-IT--Management
Jan 13, 2012
5
US
Hi All,

I'm new to vb script and need some help. I'm receiving error Object required: 'objWMIService {2,1) when running script. The script is suppose to find file version of wfica32.exe and run CitrixOnlinePluginWeb.exe /unistall depending on version of wfica32.exe.

script is located at: named citrixwebcleanup.vbs
 
You did not define "objWMIService". Try something like this:

Code:
strComputer = "."
Set objWMIService = GetObject( _
    "winmgmts:\\" & strComputer & "\root\cimv2")

Also, please post your code within this forum, rather than linking to a site that may not be up for long (and thus, not helping others with the same problem as yours.

You can surround your code in [ignore]
Code:
[/ignore] tags. Click the "Process TGML" link for all the options available.
 
Thanks guitarzan,

Greatly appreciated!

I also ended up adding which then it worked
Set WshShell = CreateObject("WScript.Shell").

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top