Jump to content

toasterking

Member
  • Posts

    2
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About toasterking

toasterking's Achievements

0

Reputation

  1. BTW, I used AutoIt 3 to read the data from the BIOS by querying WMI via COM. This is the code I used: #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.0.0 Author: Toasterking Script Function: Writes WMI strings from BIOS to file. #ce ---------------------------------------------------------------------------- If FileExists(@TempDir & "\BIOS_Strings.txt") Then FileDelete(@TempDir & "\BIOS_Strings.txt") $ObjWMIService = ObjGet('winmgmts:{impersonationLevel=impersonate}!\\' & @ComputerName & '\root\cimv2'); Create handle to WMI object If (IsObj($ObjWMIService)) And (Not @error) Then; If successsful $ColumnCompsys = $ObjWMIService.ExecQuery('Select * from Win32_ComputerSystem') $BIOSSystem = 0 For $ObjCompsys In $ColumnCompsys $BIOSSystem = $ObjCompsys.Model Next If $BIOSSystem Then FileWriteLine(@TempDir & "\BIOS_Strings.txt","System: " & $BIOSSystem) $ColumnBIOS = $ObjWMIService.ExecQuery('Select * from Win32_BIOS') $BIOSSerial = 0 For $ObjBIOS In $ColumnBIOS $BIOSSerial = $ObjBIOS.SerialNumber Next If $BIOSSerial Then FileWriteLine(@TempDir & "\BIOS_Strings.txt","Serial: " & $BIOSSerial) Else; If unsuccessful in creating COM object MsgBox(262192,"Uh-oh","Cannot create a reference to a COM object for WMI. Unable to retrieve WMI information. Strings will not be read from the BIOS and auto-selection of Windows edition will not be properly influenced. Please notify a workstation configuration engineer that you received this message.") EndIf
  2. I know I'm a little late for this thread, but I also had difficulty adding WMI support to BartPE. We use BartPE to deploy operating systems, which need to be automatically selected based on the hardware platform we are installing onto. Thus I needed to enable WMI in BartPE to be able to query the BIOS for its System and Model strings, which can then be used to automatically select the OS and start installation. Despite the overhead, I still wanted to maintain a fairly minimal footprint for BartPE. I tried several solutions suggested in this and other forums but none worked for me or provided enough information. This is how I finally got it to work: 1. Download and extract the Windows XPE plugin 1.0.7 (by Sherpya) for BartPE, and copy to the plugins directory. 2. Run PEBuilder and enable these plugins: Windows XPE v1.0.7 Windows XPE: Defaults v1.0.7 Windows XPE: MMC v1.0.7 Windows XPE: WMI v1.0.7 Then build BartPE. 3. Boot a computer from new BartPE image. Start command prompt and type: xpeinit -w 4. Wait until a subdirectory called "Repository" is created in %temp%. Copy it back to the PEBuilder file structure. Store it in the Includes directory specified in PEBuilder, under the path: [includes folder]\I386\system32\wbem 5. Run PEBuilder and disable this plugin: Windows XPE: Defaults v1.0.7 6. Build BartPE again, being sure that the Includes directory is populated in PEBuilder. I provide this in hopes that someone else finds it valuable.
×
×
  • Create New...