Friday 30 November 2012

MDT/SCCM OSD Task Sequence - Install Software Failed (hr=80008013) for Programs with dependencies


When you install an application with dependencies (nested); by running other SCCM package/programs first in MDT/SCCM OSD it fails with the error code  0x80008013 which means (E_FAIL_DEPENDENCY_NOT_RUN : This program cannot run because it depends on another program that has not run successfully before. This error code is returned to task sequence manager when a task sequence Install Software Action step cannot be run because the step has a child program which has not been run before.).

The reason is OSD in SCCM can't install the dependencies first, so you need to separate programs for your OSD Install software tasks.

The task sequence execution engine failed executing the action (Cisco Any Connect) in the group (Laptop Software) with the error code 2147516435 Action output: _ProgramID="Silent  Install",PKG_PackageID="SMS0012C"' Verified policy is compiled in 'root\ccm\policy\machine' namespace content location count = 1 Invoking Execution Manager to install software
FALSE, HRESULT=80008013 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\installsoftware.cpp,282)
0, HRESULT=80008013 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\installsoftware.cpp,746)
Entering ReleaseSource() for \\DPSERVER\SMSPKGE$\SMS0012C reference count 1 for the source \\DPSERVER\SMSPKGE$\SMS0012C\ before releasing
Released the resolved source \\DPSERVER\SMSPKGE$\SMS0012CpInstall->Install(sPackageID, sProgramName), HRESULT=80008013 (e:\nts_sms_fre\sms\client\osdeployment\installsoftware\main.cpp,374)
Failed to invoke Execution Manager to Install Software for PackageID='SMS0012C' ProgramID='Silent Install' AdvertID='SMS20333' hr=0x80008013 Install Software failed, hr=0x80008013 Install Software failed, hr=0x80008013.

See http://technet.microsoft.com/en-us/library/bb632794.aspx  for
Custom Error Codes for Configuration Manager 2007.



Thursday 29 November 2012

MDT / SCCM OSD - Run actions based on chassis type

It is very easy to run chassis type specific actions in task sequences by querying , all you need to do is adding  Task Sequence Variable in Options. Fill Variable field with IsLaptop , select your condition and write the value you wanted (True or False)
30-11-2012 12-48-15

 

Monday 26 November 2012

WinPE AdoDB SQL Connection Error (429)

I was using MDT wDB for OS deployments, now I am creating the same (better) system with SCCM for wider and easier deployment. I prefer MDT integration to SCCM as it provides lots of flexibility and customizability.

Today, I wanted to use MDT DB with my SCCM OSD, so I created a new MDT Settings package and copied my old CustomSettings.ini from MDT and customized. Duplicated my current build TS and changed the MDT Settings package in respective Gather actions.

Deployed a test machine and found out no localization settings have applied. So I found the error "Unable to create ADODB.Connection object, impossible to query SQL Server: ActiveX component can't create object ( 429 )" in logs. After a few web search I found MDT Boot image usage is recommended as it has necessary libraries to create ADODB connection.

As usual I wanted to fix that instead of using my old MDT boot image, checked WinPE_FPs folder in WAIK and seen there is a winpe-mdac.cab (MS Data Access Components) and added this package to boot image.

  • dism /mount-wim /WimFile:g:\wimwork\boot.csrx64.wim /index:1 /MountDir:G:\WimWork\x64

  • dism /image:G:\WIMWork\csrx64 /Add-Package /PackagePath:"C:\Program Files\Windows AIK\Tools\PETools\amd64\WinPE_FPs\winpe-mdac.cab"

  • dism /unmount-image /MountDir:G:\WIMWork\csrx64 /Commit


Now I have necessary libraries in my new boot image and it can connect to SQL server.

Note : Don't forget to change Netlib value to DBMSSOCN in your CustomSettings.ini if you will use SQL Authentication instead of Windows Authentication.

Thursday 22 November 2012

Configuring location based settings automatically by using Win32 IP4RouteTable in OSD - Task Sequence

The idea was creating location specific variable sets to automatically configure regional settings during deployment.

1  2

 
Select * FROM Win32_IP4RouteTable WHERE Destination='0.0.0.0' AND ( NextHop='10.99.0.254' OR NextHop='10.101.0.254' OR NextHop='10.103.0.254' OR NextHop='10.104.0.254' )

The query above is very useful as it queries the routing table to find gateway and it looks ok when you run test it in SCCM Console.

But, it doesn’t work and generates errors below during deployment

(You can use VB, PS scripts, Control.exe with .xml file or other methods by using same WMI query after Setup Windows & CM action (Windows Mode) to set regional settings, they should be easier. But I wondered if I can fix that one, as I always have used default boot images provided in WAIK and I wanted to gain some familiarity with WinPE imaging/tools. I am sure the method below may not be the good/best practise but that is what I did in last few hours, it was good experimental work for me and I believe some parts can be useful for others as well.)

Windows could not parse or process the unattended answer file for pass [specialize]. The settings specified in the answer file cannot be applied. The error was detected while processing settings for component [Microsoft-Windows-Shell-Setup].

 3
If you click ok to Restart/OK, it goes in to reboot loop with message below.The computer restarted unexpectedly or encountered an unexpected error. Windows installation cannot proceed. To install Windows, click "OK" to restart the computer, and then restart the
installation.

4

And also the error message below can be found in advertisement status messages.

5

If you check sms*.log files in deployment client drive you can also find error messages related to operands. (Attaching .vhd is very useful to do that.)
Reason ? The reason is Win32_IP4RouteTable class is invalid as it is not included in winpe-wmi.cab.

6
Win32_IP4RouteTable class has two files named Wmipiprt.mof and Wmipiprt.dll

(For more details : http://msdn.microsoft.com/en-gb/library/windows/desktop/aa394162(v=vs.85).aspx)
So I wanted to include this class to my Win-PE image.

 

1. Preperation

Enable command support option in your current boot image, start deployment but don’t select TS and proceed to installation.

7

Press F8 to open command prompt

  1. Connect to your workstation

    • (net use K: \yourmachinec$ )



  2. Copy the wmipiprt.* files to WindowsSystem32wbem folder (X: Drive)

    • (Copy K:windowssystem32wbemwmipiprt.* X:WindowsSystem32wbem)



  3. Change your working folder to X:WindowsSystem32wbem

    • Cd X:WindowsSystem32wbem



  4. Run MOF compiler for the class

    • Mofcomp wmipiprt.mof



  5. Take a copy of Win-PE Wbem

    • Xcopy X:WindowsSystem32wbem K:WinpeWork /s /e



  6. Register the the dll

    • Regsvr32 wmipiprt.dll



  7. Backup Win-PE HKLMSoftware (If you are ok the .reg file I provided you can skip all reg steps until Modifying the Image)

    • Reg save HKLMSOFTWARE HKLMSoft.reg



  8. Take a copy of exported reg file

    • Copy HKLMSoft.reg K:WinpeWork




On your workstation

Load the C:WinpeworkHKLMSoft.reg file with load hive option to your workstations HKLM, you can use any name for Hive name (e.g. WINPE)

8

Then search wmipiprt in loaded hive,


You’ll find two entries under CLSID, export these to .reg files and merge in one reg file. And unload the hive “WINPE”.  (You can also use the .reg below)
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\WIMSOFT\Classes\CLSID\{23B77E99-5C2D-482D-A795-62CA3AE5B673}]
@="WBEM IP Route Provider"

[HKEY_LOCAL_MACHINE\WIMSOFT\Classes\CLSID\{23B77E99-5C2D-482D-A795-62CA3AE5B673}\InprocServer32]
@="X:\\Windows\\System32\\wbem\\WMIPIPRT.dll"
"ThreadingModel"="Both"

[HKEY_LOCAL_MACHINE\WIMSOFT\Classes\CLSID\{6D7A4B0E-66D5-4AC3-A7ED-0189E8CF5E77}]
@="WBEM IP Route Event Provider"

[HKEY_LOCAL_MACHINE\WIMSOFT\Classes\CLSID\{6D7A4B0E-66D5-4AC3-A7ED-0189E8CF5E77}\InprocServer32]
@="X:\\Windows\\System32\\wbem\\WMIPIPRT.dll"
"ThreadingModel"="Both"


2. Modifying the image (Be sure you have a backup of your original boot image in separate place.)

Mount your boot image in writable mode.

Imagex /mountrw G:WIMWorkx64boot.wim G:WIMWorkx64mount


(G:WIMWorkx64mount is an empty folder)


Open G:WIMWorkx64mount folder, you’ll see your winpe image contents

Delete G:WIMWorkx64mountWindowsSystem32wbem contents

Copy the K:WinpeWorkwbem content you have copied from running Win-PE to your work folder in first steps of Preparation above.

Run Regedit, select HKLM then select load hive from menu,

Select G:WIMWorkx64mountWindowsSystem32ConfigSoftware to load and give WIMSOFT as a name if you are going to use my .reg file above.


Run the .reg you’ve created by correcting paths or directly the one above.

(Check two new entries under WIMSOFTClassesCLSID)


Unload WIMSOFT Hive.

Now we need to dismount the image with commit option.

Imagex /unmount /commit G:WIMWorkx64mount


Finished.

Take a backup of your current boot image on SCCM, copy this one to your source and update your distribution points to test. (Or create a new image, to test first.)

10

Now you can use Win32_IP4RoutingTable in Win-PE mode.

Place your variable set tasks just before the Configure action in PostInstall phase.

Friday 16 November 2012

How to disable password requirement in SCCM PXE Service Point

You set a password before and unset by removing the tick, but it still asks for a password, the problem here is removing the tick is not enough to disable password protection, so delete passwords first then remove the tick, apply settings and click ok.