shuttrbug Posted March 27, 2007 Share Posted March 27, 2007 OK. Here is a thought that I had.1. I have found numerous places (and tested myself) how to manually change the HAL type in windows (replacing the hal.dll file).2. I have seen scripts that detect the computer hardware (determining the required HAL type) and then will update the sysprep.inf file.Would it be possible to build a script that would determine the hardware type and then change the HAL file automatically?I am able to boot with the ACPI HAL, but would like to update it to MP_HAL, etc?I have done some scripting and would be able to build the script to update the hal file, but am not sure how to read the hardware type. Any help is greatly appreciated. Thanks Link to comment Share on other sites More sharing options...
gunsmokingman Posted March 27, 2007 Share Posted March 27, 2007 Try this script, you will have to add what you are checking for and how to change it.Save as PNP_Check.vbsstrComputer = "." Dim ColItems,ObjItem,Var1,Var2,Wmi Dim Act, Fso, OutFile, Ts Var1 = Space(2) & Chr(187) & Chr(160) Var2 = space(3) & Chr(171) & " ----------------------------------- " & Chr(187) Set Act = CreateObject("Wscript.Shell") Set Fso = CreateObject("Scripting.FileSystemObject") Set Wmi = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set ColItems = Wmi.ExecQuery("SELECT * FROM Win32_PnPEntity",,48) OutFile = Act.ExpandEnvironmentStrings("%UserProfile%\Desktop\HalInfo.txt") Set Ts = Fso.CreateTextFile(OutFile) Ts.writeline Var1 & Now() & vbCrLf &_ Var1 & Act.ExpandEnvironmentStrings("%ComputerName%") For Each ObjItem in ColItems Ts.writeline Var2 Ts.writeline Var1 & "Caption : " & ObjItem.Caption Ts.writeline Var1 & "Class Guid : " & ObjItem.ClassGuid If isNull(ObjItem.CompatibleID) Then Ts.writeline Var1 & "CompatibleID : No Information" Else Ts.writeline Var1 & "CompatibleID : " & Join(ObjItem.CompatibleID, ",") End If Ts.writeline Var1 & "Description : " & ObjItem.Description Ts.writeline Var1 & "Device ID : " & ObjItem.DeviceID If isNull(ObjItem.HardwareID) Then Ts.writeline Var1 & "Hardware ID : No Information" Else Ts.writeline Var1 & "Hardware ID : " & Join(ObjItem.HardwareID, ",") End If Ts.writeline Var1 & "Manufacturer : " & ObjItem.Manufacturer Ts.writeline Var1 & "PNP Name : " & ObjItem.Name Ts.writeline Var1 & "PNP Device ID : " & ObjItem.PNPDeviceID Next Ts.writeline Var2 Ts.Close Act.Run("Notepad.exe " & OutFile),1,True Dim ZZ1 ZZ1 = MsgBox("Did you want to keep this file" & vbCrLf & Var1 &_ "Yes to keep the file" & vbCrLf & Var1 & "No to delete the file",4132,"Keep Or Delete") If ZZ1 = 7 Then Fso.DeleteFile(OutFile) End If Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now