Wednesday, 28 September 2011

CODE 12 in Device Manager after WDS imaging

After imaging 26 computers with Windows 7 it was time to image a few more scattered around the site.  Fourtunatly they were all HP Pro 6000 series Desktops so they were all the same except the origianl image was made from an AMD based version and i was imaging onto an Intel based version.

The Imaging worked fine and booted into the OS, i found that it had add itself to the domain and everything seems functional except the video card.

After a look into the device manager i noticed a nice Yellow explaination mark indicating no driver has been installed.  I looked futher into the device and found:

CODE 12: Could not find enough resoruces.

After a few hours of deleting the reinstalling drivers reimaging the PC and pulling out my hair, i noticed a system driver called:

AMD pci express (3GIO) filter driver

This driver according to the system was working OK, i had noticed this driver earlier and even uninstalled it but it still came back and reloaded itself so i assumed it was actaully part of the system.

Now, i though this driver was odd and really shouldn't be on an intel system, so i uninstalled it but thsi time i noticed a tick box on the unisntall confirmation screen which said "Delete the Files for this Driver" so i ticked that box aswell.......BINGO

After Uninstalling the "AMD pci express (3GIO) filter driver" and Tickign the "Delete Associated Files" option the system then reinstalled all the drivers associated with the system and after another reboot the Display driver and all other drivers worked fine.

One thing to note is that i couldn't use the keyboard or mouse after i deleted the software, so either try a PS2 KB or press the power button to restart the system after you delete this drive.

-Fr33ze

Tuesday, 27 September 2011

WSUS and the PC's that don't want to report

Ok so below is a direct copy from this website.  It highlights a problem that exisits when imaging multiple PC's from WDS.  Now im not sure if this occurs when the origianl image is made from a PC that is on the domain or not.  I used the VB Script to ease my burden.

5. Imaged clients with a duplicate client ID will only appear once in the WSUS Admin Console. Each AU client must have a unique id which is created for each individual install. When imaging systems it is recommended always to use SysPrep. The WSUS admin console will only display one client for each unique ID. If you have multiple clients created from one image which are sharing the same ID, only one will appear in the WSUS admin console. All clients will check in and download updates, but only one will appear and display status in the WSUS admin console. In cases where clients are not checking in, and they were created from images without running SysPrep, the following steps will reset the existing duplicative client IDs.
a. Run regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate
b. Delete the PingID, SUSClientID and the AccountDomainSID values
c. Stop and start the Wuauserv Service
d. From the command prompt run: wuauclt /resetauthorization /detectnow

or-


From the command line, once you are sure the AU client is properly configured and not disabled, you could run a batch file (which might look something like this sample) and get the same results:

rem Fixes problem with client machines not showing up on the server due to imaging method

reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v AccountDomainSid /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v PingID /f
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate /v SusClientId /f
cls
@echo Triggering detection after resetting WSUS client identity
net stop wuauserv
net start wuauserv
wuauclt /resetauthorization /detectnow

Additionally the following VBScript can be deployed via group policy to perform the above function automatically at logon. The script creates a registry key that will allow the script to check if it has been run on that client before. If it has it ends without performing any further changes.

Dim objShell, strKeyPath, strValueName,strComputer
set objShell = wscript.createObject("wscript.shell")
const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"
strValueName = "SUSClientIdReset"

objRegistry.GetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, dwValue
IF (dwValue = "1") THEN
            'do nothing
      ELSE
            'Fixes problem with client machines not showing up on the server due to imaging method
            objRegistry.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,"SusClientId"
            objRegistry.DeleteValue HKEY_LOCAL_MACHINE,strKeyPath,"SusClientIdValidation"
   Set colServiceList = objWMIService.ExecQuery ("Select * from Win32_Service where Name = 'wuauserv'")
   For Each objService in colServiceList
    If objService.State = "Running" Then
    objService.StopService()
    Wscript.Sleep 10000
    objService.StartService()
    End If
   Next
 
            objShell.Run("wuauclt /resetauthorization /detectnow ")
   Wscript.Sleep 10000 
            objShell.Run("wuauclt /r /reportnow")
            'Set reg value for SUSClientIdReset for checking against later.
   dwValue = "1"
            objRegistry.SetStringValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName, dwValue
End If

Just save the above scipt as a *.vbs.

-Fr33ze