Jump to content

WSH GetObject method not working in Windows PE using Windows 2003 SP1


Recommended Posts

Posted

I'm trying to get the current IP address of the machine so that I can use it to determine our site location. Oddly enough, when I use my PE build based on WinXP SP2, the code runs fine. When I try the same code using the Win2003 SP1 source, it fails.

Is there something else besides the /WMI switch during the mkimg.cmd that I have to include

It fails on the following line:

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

The error message is:

error '800401e4'

Invalid syntax


Posted

Works here with 2003SP1 and pe2005.

I dont know if you have declared your computername properly but i would do

Set objwmiservice = GetObject("winmgmts:\\.\root\cimv2")

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...