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")

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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