Thursday, August 21, 2008

Add a list of PCs to Active Directory

I got tired of entering computer names by hand in ADUC. Seeing that I have close to 100 machines to enter, I decided to write a script. Here's the business portion of it. I use a logfile to record the results.

for /f "tokens=2 delims=| skip=1" %%i in (%datfile%) do (
echo Adding : >> .\logs\%logfile% 2>&1
dsadd computer "cn=%%i,%ou_string%" -d %domain% -u %user% -p %pass% >> .\logs\%logfile% 2>&1
echo To : cn=%%i,%ou_string% >> .\logs\%logfile% 2>&1
echo **************************** >> .\logs\%logfile% 2>&1
)

Friday, August 15, 2008

Sysprep Intel Video Driver Issue

Well, had an interesting sysprep issue. I need one image to work both on a clone with an Intel ICH9 chipset and an Optiplex 755 with the same. Here are the two scenarios:

1) Build base on 755 and image on clone.
This didn't work because the clone was missing the audio driver and a some Intel Chipset drivers.

2) Build base on clone and image on 755.
This worked better because the two drivers were installed. The only issue was that the Intel Q35 Video wasn't completely recognized. It kept on asking for the installation CD. I'm not sure why as it was recognized before.

I worked with scenario 2 and discovered the following in the setupapi.log. Highlighted in orange is what the installer found. Highlighted in purple is what the installer used. The section"[iBLB0]" that was installed had a mismatched driver version compared to what was in igxp32.inf. As a result I had to rem out that section in oem4.inf. It skipped to oem39.inf and used the section "[iBLB1]" which had the same version number, 6.14.10.4964, as igxp32.inf. Igxp32.inf is the correct installation file for the driver. I'm sure that I could have remmed out sections in oem39.inf as well and used igxp32.inf instead.

[2008/08/15 11:13:59 540.68 Driver Install]
#-019 Searching for hardware ID(s): pci\ven_8086&dev_29b2&subsys_02111028&rev_02,pci\ven_8086&dev_29b2&subsys_02111028,pci\ven_8086&dev_29b2&cc_030000,pci\ven_8086&dev_29b2&cc_0300
#-018 Searching for compatible ID(s): pci\ven_8086&dev_29b2&rev_02,pci\ven_8086&dev_29b2,pci\ven_8086&cc_030000,pci\ven_8086&cc_0300,pci\ven_8086,pci\cc_030000,pci\cc_0300
#-198 Command line processed: C:\WINDOWS\system32\services.exe -setup
#I022 Found "PCI\VEN_8086&DEV_29B2&SUBSYS_02111028" in C:\WINDOWS\inf\oem4.inf; Device: "Intel(R) Q35 Express Chipset Family"; Driver: "Intel(R) Q35 Express Chipset Family"; Provider: "Intel Corporation"; Mfg: "Intel Corporation"; Section name: "iBLB0".
#I023 Actual install section: [iBLB0]. Rank: 0x00000001. Effective driver date: 06/05/2007.
#I022 Found "PCI\VEN_8086&DEV_29B2" in C:\WINDOWS\inf\oem39.inf; Device: "Intel(R) Q35 Express Chipset Family"; Driver: "Intel(R) Q35 Express Chipset Family"; Provider: "Intel Corporation"; Mfg: "Intel Corporation"; Section name: "iBLB0".
#I023 Actual install section: [iBLB0]. Rank: 0x00002001. Effective driver date: 06/27/2008.
#I022 Found "PCI\VEN_8086&DEV_29B2" in C:\sysprep\vid\igxp32.inf; Device: "Intel(R) Q35 Express Chipset Family"; Driver: "Intel(R) Q35 Express Chipset Family"; Provider: "Intel Corporation"; Mfg: "Intel Corporation"; Section name: "iBLB0".
#I023 Actual install section: [iBLB0]. Rank: 0x00002001. Effective driver date: 06/27/2008.
#I022 Found "PCI\VEN_8086&DEV_29B2" in c:\temp\igxp32.inf; Device: "Intel(R) Q35 Express Chipset Family"; Driver: "Intel(R) Q35 Express Chipset Family"; Provider: "Intel Corporation"; Mfg: "Intel Corporation"; Section name: "iBLB0".
#I023 Actual install section: [iBLB0]. Rank: 0x00002001. Effective driver date: 06/27/2008.
#-166 Device install function: DIF_SELECTBESTCOMPATDRV.
#I063 Selected driver installs from section [iBLB0] in "c:\windows\inf\oem4.inf".
#I320 Class GUID of device remains: {4D36E968-E325-11CE-BFC1-08002BE10318}.
#I060 Set selected driver.
#I058 Selected best compatible driver.
#-166 Device install function: DIF_INSTALLDEVICEFILES.
#I124 Doing copy-only install of "PCI\VEN_8086&DEV_29B2&SUBSYS_02111028&REV_02\3&172E68DD&0&10".
#-011 Installing section [iBLB0] from "c:\windows\inf\oem4.inf".
#E358 An unsigned or incorrectly signed file "c:\windows\inf\oem4.inf" for driver "Intel(R) Q35 Express Chipset Family" blocked (server install). Error 1168: Element not found.
#E122 Device install failed. Error 1168: Element not found.