Help - Search - Members - Calendar
Full Version: WSH GetObject method not working in Windows PE using Windows 2003 SP1
MSFN Forums > Unattended Windows Discussion & Support > Windows PE

   
Google Internet Forums Unattended CD/DVD Guide
passmaster16
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
mats
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")
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.