Search This Blog

Wednesday, April 25, 2012

Wise Scripting

WiseScript™ is a high-level scripting language that consolidates dozens or hundreds of lines of code into predefined script actions. WiseScript has been used for years to create application installations; however, this document focuses on its use as a tool for quickly creating utilities to automate system administration tasks. Example: Adding, deleting, and moving files and directories; freeing disk space; and mapping network drives.

You can create WiseScripts in any of the following products:
  • WiseScript for NS (Notification Server) is a WiseScript authoring environment that lets system administrators create .EXEs that automate Altiris tasks in a batch mode and manage resources more effectively. WiseScript for NS is part of the Wise Toolkit that is available to users of Altiris® Client Management Suite™ software.
  • WiseScript Editor, like WiseScript for NS, is a WiseScript authoring environment. In addition to automating system administration tasks, installation developers can use it to create .EXEs to use as custom actions in Windows Installer installations. These custom actions can extend the capabilities of Microsoft Windows Installer and simplify installation tasks that are difficult to accomplish with Windows Installer. WiseScript Editor is available in the Wise Package Studio, Wise Installation Studio, and Wise Installation Express products.
  • WiseScript Package Editor is an application development tool for creating and editing installation packages based on WiseScript. It is available in Wise Package Studio® Professional Edition and Wise Installation Studio. It formerly was named Wise Installation System.
Although the focus of each of these products is different, most of the WiseScripts that they create are interchangeable. Example: You can create a script in WiseScript Package Editor and use it to automate tasks in the Altiris® Notification Server™ environment.
Topics include:

Why Use WiseScript™?

Use WiseScript to automate system administration tasks. Its easy-to-use, structured interface lets you create useful scripts in a fraction of the time it would take to write them in a free-form scripting language such as VBScript.
WiseScript excels at retrieving information about a computer, prompting for input (example: passwords) if necessary, and taking action based on that information. This is different from using Altiris® Inventory Solution® software, for example, which can collect snapshot information about a computer's state but cannot take immediate action. In addition, the computer's state might change between the time you take the snapshot and when you can analyze the data and schedule a task to take action. A WiseScript collects and analyzes the data and takes action in real time.
When you have a task that you cannot easily perform with your other tools, reach for WiseScript. You can write a WiseScript to quickly solve an urgent problem, and you can create a library of WiseScripts to resolve common problems and perform routine maintenance. Use Altiris® Software Delivery Solution™ software to deploy your WiseScripts on an as-needed or regularly scheduled basis.

Scenarios for Using WiseScript

  • An end user reports that their default browser does not open when they click on an HTML file. You can create a simple WiseScript that reads the default browser from the registry, verifies that the default browser is installed, and either edits the registry key, installs the default browser, or both.
  • You need to update a platform-dependent .DLL file on a collection of computers that are running different operating systems. Instead of creating a different Software Delivery task for each version of the file, you can create one Software Delivery task that runs a WiseScript. The WiseScript finds the version of Windows that is running on each computer and installs the correct .DLL file for that version.
  • You want all company computers to display a corporate desktop theme. You can write a WiseScript to:
    • Check the Windows version on the computer.
    • Create a theme directory.
    • Register the path to the theme directory in the registry, using WiseScript's conditional logic to create the registry key in a different location depending on the Windows version.
    • Install the theme file in its directory.

Additional WiseScript Examples

Following are just a few of the tasks you can accomplish with WiseScript. Samples of some of these scripts are included in this document.

WiseScript Benefits

  • WiseScripts are tota
  • lly self-contained and do not require a scripting engine on the destination computer.
  • WiseScript is a proven, well-tested technology.
    • For more than 10 years, WiseScript has been used to created installations for millions of desktops.
    • Large Internet service providers and several instant messenger clients use WiseScript installations for their applications.
  • WiseScripts can run on Windows 3.1, 95, 98, ME, NT, 2000, XP, and Windows Server 2003 with little or no modification.
  • WiseScripts can be run silently or, unlike a batch file, with end user interaction.
  • WiseScripts are small. The script engine is less than 100 KB.
  • WiseScript is easy to use.
    • You build WiseScripts by dragging and dropping actions and completing dialogs.
    • You do not have to declare variables before you use them.
    • Control and logic structures are very easy to build.
  • WiseScript is well known.
    WiseScript was licensed to Microsoft to be the basis of the SMS Installer, which means that WiseScript is also used by thousands of SMS administrators.
  • WiseScript is well supported.
    Public Web sites provide hundreds of free scripts.
  • WiseScript is powerful.
    In addition to the dozens of predefined actions, WiseScripts can call VBScripts and DLL functions, making it possible to use any Windows system call.
  • WiseScript is fast.
    Because the WiseScript engine is written in C++, when you build a WiseScript, you are building a C++ program. A WiseScript executes faster than a VBScript that performs the same operation.
  • WiseScript is extensible.
    You can streamline your scripting process by creating your own script actions for tasks that you perform frequently. To create a user-defined action, create a WiseScript .WSE (project file) and save it in the Actions subdirectory of the WiseScript product's installation directory. Your action will be available for use in future scripts.

About the Script Editor Interface

All WiseScript products contain the Script Editor scripting environment. You don't need to memorize commands because Script Editor supports a point-and-click method of scripting. The script you create is displayed in clear, English-like statements.
The script is compiled, along with files and other resources, into an .EXE. When the .EXE is launched, the script runs, executing the actions that are specified in the script.
You create a WiseScript by adding actions to the script pane from a predefined list. When you add an action, a dialog appears that lets you enter the parameters for the action.
For more information about the Script Editor interface, see the WiseScript product documentation, which you can open from the Help menu in the WiseScript product.

Process for Creating a Script

  1. Open your WiseScript product.
    For details, see the WiseScript product documentation, which you can open from the Help menu in the WiseScript product.
  2. If a previous WiseScript opens, select File menu > New.
    If the New Installation File dialog appears, select Blank Script and click OK.
  3. Add script actions. See Adding an Action to a Script
    • Each action opens a dialog that lets you enter parameters.
      Note
      Context-sensitive help is available for every script action dialog; press F1 when the dialog appears.

    • You can drag actions to rearrange them in the script.
    • You can comment scripts for easier modification later.
  4. Save the WiseScript. The project file format is .WSE.
  5. Compile the WiseScript by clicking Compile at the lower right of the main window. This creates an .EXE.
  6. Test the WiseScript:
    • To test the WiseScript without actually making changes to your computer, click Test at the lower right of the main window. This is most useful for testing any user interface elements of the WiseScript.
    • To run the WiseScript on your computer, click Run at the lower right of the main window. This will make changes to your computer.
  7. If you are using WiseScript within the Altiris® Notification Server™ software, you can use the Altiris Console to:
    1. Create a Software Delivery package that runs the WiseScript program.
    2. Configure a Software Delivery task to run the package on a specific collection of computers.
    3. Schedule the task as needed.
  8. For details, see the appropriate Altiris documentation at www.altiris.com/Support/Documentation.aspx.

Adding an Action to a Script

In Script Editor, do any of the following:
  • From the Actions list in the left pane, drag an action onto a line in the Installation Script list in the right pane. The new action appears above the line that is highlighted when you drop the action.
  • Click in the script and double-click the action in the Actions list to place the new action above the line you clicked.
  • Click in the script and start typing the first few letters of the action name. As you type, the current line becomes a drop-down list with all the action names, and the action that most closely matches the letters you typed is the current item in the list. When the action you want is the current item in the list, press Enter.
When you add an action, a dialog appears that lets you set the parameters for the action unless it does not require parameters. When you add a Custom Dialog or Custom Billboard action, the appropriate editing environment opens.
Some actions come in pairs. (Example: When you add an If action, you must also add an End action at the end of the condition block.) Script Editor indents actions inside these pairs.
Context-sensitive help is available for every script action dialog; press F1 when the dialog appears.

Sample Script Tutorials

This section contains tutorials that provide an introduction to WiseScript while leading you through the creation of several useful scripts. No knowledge of WiseScript is necessary to complete the tutorials.
Typically, you would use follow normal Software Delivery procedures to deliver WiseScripts to and run them on managed computers. However, in this tutorial you will run these sample scripts on your computer.
The tutorials begin with simple scripts that perform useful tasks, such as removing "spyware" and emptying the Temp directory. The later tutorials cover more advanced functions: using conditional logic to guide execution, writing information to dialogs, and calling .DLLs.
To complete the tutorials, you must have access to a WiseScript product. (For a list of WiseScript products, see the introduction to this article.) If you do not have a WiseScript product, you can read through the tutorials to get an idea of how easy it is to create WiseScripts.
See:

Locate and Delete a File and its Directory

Scenario: You need to locate a newly-discovered spyware program on an infected computer and delete that program and its container directory.
In this example, you will take advantage of WiseScript's extensive file search functionality to locate the spyware file. You also will use WiseScript variables to store the path to the spyware and to provide the path to the files to delete. Then you will remove the file and delete the host directory.
To simulate a spyware program and its related directories and files, you will create several sample directories and harmless text files on your computer.
To prepare sample directories and files for this WiseScript to delete
  1. Create the directory Program Files\Sample.
  2. Create a text file named Sample.txt and add it to the directory you just created.
  3. Create one or more subdirectories under Program Files\Sample and add one or more files to each subdirectory. It doesn't matter what names you give to these subdirectories and files.
To create the sample script
  1. Open your WiseScript product.
  2. If a previous WiseScript opens, select File menu > New.
    If the New Installation File dialog appears, select Blank Script and click OK.
  3. In the Actions list on the left, double-click the Search for File action.
  4. Complete the Search for File Settings dialog as follows and then click OK. (Leave the defaults for any values that are not listed here.)
    • File Name
      Enter Sample.txt
    • Variable Name
      Enter FILELOC
    • This variable will store the path to the file.
    • Remove File Name
      Select this checkbox to strip the filename from the path that is stored in the variable.
  5. Drag the Delete File(s) action to the right pane, below the first action, complete its dialog as follows, and then click OK.
    • Pathname
      Enter %FILELOC%\*.*
      This uses the path returned from the search function and uses wildcards to specify every file in the directory.
    • Include Sub-Directories
      Select this checkbox
    • Remove Directory Containing Files
      Select this checkbox
Your script should look like this:
To compile and verify the script
  1. Save the WiseScript as Delete_File.wse. The extension .WSE represents a WiseScript project file.
  2. Click Compile at the lower right of the main window. This creates an .EXE with the same name as the project file.
  3. In the WiseScript Editor, click Run in the lower right of the window. The WiseScript runs on your computer.
  4. In Windows Explorer, verify that all the files and directories have been deleted and that the Sample directory no longer appears under Program Files.

Clear the Temp Directory

Scenario: You need to clear the current user's Temp directory to free space for a new application.
In this example, the script reads the TEMP environment variable to get the path to the current user's Temp directory. Then it uses the Delete File(s) action to clear the directory.
You could use a similar script to empty the Recycle bin or clear the Internet cache.
An advantage of WiseScript's Delete File(s) action is that it attempts to delete every file in the directory individually. That way, when it encounters a read-only file (example: an Altiris agent XML file) or a file that is in use, it skips that file and proceeds to the next file. This is an improvement over the DOS delete *.* command, which stops when it encounters the first read-only file.
To create the sample script
  1. Open your WiseScript product.
  2. If a previous WiseScript opens, select File menu > New.
    If the New Installation File dialog appears, select Blank Script and click OK.
  3. In the Actions list on the left, double-click the Get Environment Variable action.
  4. Complete the Get Environment Variable dialog as follows and then click OK. (Leave the defaults for any values that are not listed here.)
    • Env. Variable
      Enter TEMP
    • Variable Name
      Enter TEMPLOC
  5. Drag the Delete File(s) action to the right pane (below the first action), complete its dialog as follows, and then click OK.
    • Pathname
      Enter %TEMPLOC%\*.*
    • Include Sub-Directories
      Select this checkbox
Your script should look like this:
To compile and verify the script
  1. In the WiseScript Editor, click Run in the lower right of the window.
  2. In the Save As dialog, name the file Clear_Temp.wse.
    The file is saved and compiled, and the compiled WiseScript runs on your computer.
  3. In Windows Explorer, verify that the current user's Temp directory is empty.

Note
Read-only files (example: Altiris temp files) or files that are in use might not be deleted.

Find the Current Windows Version

Scenario: You need to update a file on a collection of computers. Because the file is platform-dependent, you need to find the version of Windows that is running on each computer and install the correct file for that version.
Instead of creating a different Software Delivery task for each version of the file, you can create one Software Delivery task to run a WiseScript that determines the operating system on each computer and installs the appropriate file.
In this example, you will create a script that collects the numeric Windows version from the computer. Instead of installing a file, the script displays a message identifying the Windows version. In a production environment, you would use a combination of If Statements and Install File(s) actions to install the file.
Ideally, this sample test could look like this:
If WindowsVersion is less than 5.1, then Windows = Windows 2000
If WindowsVersion is greater than or equal to 5.1 AND less than 5.2, then Windows
= Windows XP

If WindowsVersion is greater than or equal to 5.2, then Windows = Windows Server 2003
However, WiseScript does not use logical ANDs and ORs; a WiseScript If Statement can take one argument only. Therefore, you must nest the conditional statements, resulting in logic that looks like this:
If WindowsVersion is less than 5.1, then Windows = Windows 2000
Else If WindowsVersion is greater than or equal to 5.1, then
     If WindowsVersion is less then 5.2, then Windows = Windows XP
     Else If WindowsVersion is greater than or equal to 5.2, then Windows = Windows Server 2003
     End inner If statement
End outer If statement

Note
This procedure assumes that you know how to add actions to a script. For help, see Adding an Action to a Script.

To create the sample script
  1. Open your WiseScript product.
  2. If a previous WiseScript opens, select File menu > New.
    If the New Installation File dialog appears, select Blank Script and click OK.
  3. To get the operating system version number, add a Get System Information action, complete its dialog, and click OK:
    • Variable
      Enter OS
    • Retrieve
      Select Windows Version
  4. The next section of the script performs logical tests on the OS variable and stores the results in a new variable, OSNAME.
  5. Add an If Statement action, complete its dialog, and click OK:
    • If Variable
      Enter OS
    • operator drop-down list (unnamed)
      Select Less Than
    • The Value
      Enter 5.1
  6. Add a Set Variable action, complete its dialog, and click OK:
    • Variable
      Enter OSNAME
    • New Value
      Enter Windows 2000
  7. Add an ElseIf Statement action, complete its dialog, and click OK:
    • If Variable
      Enter OS
    • operator drop-down list (unnamed)
      Select Greater than or Equal
    • The Value
      Enter 5.1
  8. Add an If Statement action, complete its dialog, and click OK:
    • If Variable
      Enter OS
    • operator drop-down list (unnamed)
      Select Less Than
    • The Value
      Enter 5.2
  9. Add a Set Variable action, complete its dialog, and click OK:
    • Variable
      Enter OSNAME
    • New Value
      Enter Windows XP
  10. Add an ElseIf Statement action, complete its dialog, and click OK:
    • If Variable
      Enter OS
    • operator drop-down list (unnamed)
      Select Greater than or Equal
    • The Value
      Enter 5.2
  11. Add a Set Variable action, complete its dialog, and click OK:
    • Variable
      Enter OSNAME
    • New Value
      Enter Windows Server 2003

Note
To check for a version of Windows that is not mentioned here, add statements to the condition block for each additional version.

  1. Close the condition block by adding an End Statement for each level of the block:
    1. Add an End Statement action below the last line in the script. This closes the inner block.
    2. Add a second End Statement action. This closes the outer block.
  2. To display the value of the OSNAME variable, add a Display Message action, complete its dialog, and click OK:
    • Message Title
      Enter Current Windows Version
    • Message Text
      Enter This version of Windows is %OSNAME%.
    • Message Icon
      Select Information
Your completed script should look like this:
To compile and verify the script
  1. In the WiseScript Editor, click Run in the lower right of the window.
  2. In the Save As dialog, name the file Find_Windows_Ver.wse.
    The file is saved and compiled, and the compiled WiseScript runs on your computer.
  3. Verify that the message displays the version of Windows that is on your computer.
  4. Click OK to clear the message.

Find and Report System Information

Scenario: You need to collect information about a particular computer.
When trying to diagnose a network or software problem, system administrators often need to get information from the managed computer, such as version numbers of specific files, the values of certain registry keys, what server the computer is logged onto, and so on. Remote control can provide some of this information, but it's a manual, time-consuming process, prone to mistakes. By using WiseScript, administrators can create re-usable scripts that can find this information and report it to the screen, write it to a text file, or even post it to an HTTP server.
More importantly, you can use the conditional logic built in to WiseScript to take action based on the information that is collected. This action can include deleting files, setting registry key values, executing programs, or calling functions within .DLLs for very specific and advanced tasks.
In this example, you will create a data-mining script that quickly finds information about a computer. In this tutorial environment, this information is displayed on the screen. In a production environment, you would take appropriate action based on what the script discovers.

Note
This procedure assumes that you know how to add actions to a script. For help, see Adding an Action to a Script.

To create the sample script
  1. Open your WiseScript product.
  2. If a previous WiseScript opens, select File menu > New.
    If the New Installation File dialog appears, select Blank Script and click OK.
  3. To get the current time, add a Get System Information action, complete its dialog, and click OK:
    • Variable
      Enter TIME
    • Retrieve
      Select Current Date/Time
  4. To get the operating system version, add a Get System Information action, complete its dialog, and click OK:
    • Variable
      Enter OS
    • Retrieve
      Select Windows Version
The next section of the script uses environment variables to collect network-specific information. For information on obtaining environment variables, see Resources.
  1. Add a Get Environment Variable action, complete its dialog, and click OK:
    • Env. Variable
      Enter PROCESSOR_IDENTIFIER
    • Variable Name
      Enter PROCESSOR
  2. Add a Get Environment Variable action, complete its dialog, and click OK:
    • Env. Variable
      Enter USERNAME
    • Variable Name
      Enter USER
  3. Add a Get Environment Variable action, complete its dialog, and click OK:
    • Env. Variable
      Enter USERDOMAIN
    • Variable Name
      Enter DOMAIN
  4. Add a Get Environment Variable action, complete its dialog, and click OK:
    • Env. Variable
      Enter LOGONSERVER
    • Variable Name
      Enter LOGON
  5. To display the information that is collected, add a Display Message action, complete its dialog, and click OK:
    • Message Title
      Enter Current System Information
    • Message Text
      Press Ctrl+Enter after each of the following lines to enter carriage returns in the message box without closing the dialog. The current time is: %TIME%
      The current Windows version is: %OS%
      The processor type is: %PROCESSOR%
      The logged on user is: %USER%
      The computer belongs to the %DOMAIN% domain
      It is logged onto server: %LOGON%
    • No Cancel
      Select this checkbox to make this an informational message rather than one that asks the end user for a decision.
Your completed script should look like this:
To compile and verify the script
  1. In the WiseScript Editor, click Run in the lower right of the window.
  2. In the Save As dialog, name the file Report_System_Info.wse.
    The file is saved and compiled, and the compiled WiseScript runs on your computer.
  3. Verify that the system information is displayed correctly.
  4. Click OK to clear the message.

Map a Network Drive

Scenario: To accommodate increased file storage requirements, you have added a new shared drive to your network. Now you need to map the new shared network drive on all your managed computers.
In this example, you will create a script that maps a shared network drive to a drive letter that you specify. This is accomplished by calling a Microsoft .DLL (mpr.dll), which should be in your System32 directory. When you add the action to call the .DLL, you specify parameters to pass to the .DLL during execution.

Note
This procedure assumes that you know how to add actions to a script. For help, see Adding an Action to a Script.

To create the sample script
  1. Open your WiseScript product.
  2. If a previous WiseScript opens, select File menu > New.
    If the New Installation File dialog appears, select Blank Script and click OK.
  3. Add a Set Variable action, complete its dialog, and click OK:
    • Variable
      Enter SHARE
    • New Value
      Enter a valid, shared drive in this format: \\SERVER\SHARE
  4. Add a Set Variable action, complete its dialog, and click OK:
    • Variable
      Enter DRIVELETTER
    • New Value
      Enter the drive letter to map (example: J:)
  5. Add a Call DLL Function action. This calls a Microsoft .DLL to perform the drive mapping.
    1. Complete the upper portion of the Call DLL Function dialog:
      • DLL Pathname
        Enter %SYS32%\mpr.dll
      • Function Name
        Enter WNetAddConnectionA
      • Call a function with variable parameter list
        Select this option
    2. On the Call DLL Function dialog, click Add. Complete the DLL Parameter Settings dialog that appears and click OK:
      • Parameter Type
        Select string pointer
      • Passing Type
        Select Normal
      • Value Source
        Select Variable
      • Variable Name
        Enter SHARE
      The parameter is added to the list on the Call DLL Function dialog.
    3. On the Call DLL Function dialog, click Add again. Complete the DLL Parameter Settings dialog that appears and click OK:
      • Parameter Type
        Select string pointer
      • Passing Type
        Select Normal
      • Value Source
        Select Constant with NULL value
        This passes an empty string to the password for the connection and uses the current user's password. To pass a NULL value (example: When the password is NULL), set the parameter type to dword, set the value source to Constant, and enter 0 as the constant value.
      The parameter is added to the list on the Call DLL Function dialog.
    4. On the Call DLL Function dialog, click Add again. Complete the DLL Parameter Settings dialog that appears and click OK:
      • Parameter Type
        Select string pointer
      • Passing Type
        Select Normal
      • Value Source
        Select Variable
      • Variable Name
        Enter DRIVELETTER
      The parameter is added to the list on the Call DLL Function dialog.
    5. On the Call DLL Function dialog, set the following options:
      • Return Value Type
        Select dword
      • Returned Variable
        Enter RETURN
    6. Click OK on the Call DLL Functions dialog.
    The final section of the script contains a condition block to display either of two messages, depending on the results of the mapping.
  6. Add an If Statement action, complete its dialog, and click OK:
    • If Variable
      Enter RETURN
    • operator drop-down list (unnamed)
      Select Equals
    • The Value
      Enter 0
  7. Add a Display Message action, complete its dialog, and click OK:
    • Message Title
      Enter Create Mapping
    • Message Text
      Enter Successfully mapped %DRIVELETTER% to %SHARE%
    • Message Icon
      Select Information
    • No Cancel
      Select this checkbox
  8. Add an Else Statement action. A dialog does not appear because this action doesn't require any parameters.
  9. Add a Display Message action, complete its dialog, and click OK:
    • Message Title
      Enter Create Mapping
    • Message Text
      Enter Failed to map %DRIVELETTER% to %SHARE%, error $%RETURN%
    • Message Icon
      Select Exclamation
    • No Cancel
      Select this checkbox
  10. Add an End Statement action to close the condition block.
Your completed script should look like this:
Click to view.
To compile and verify the script

Caution
Run this script only if you have specified a valid network drive that is accessible to your computer.

  1. In the WiseScript Editor, click Run in the lower right of the window.
  2. In the Save As dialog, name the file Map_Drive.wse.
    The file is saved and compiled, and the compiled WiseScript runs on your computer.
  3. Verify that the drive was mapped correctly.
  4. Click OK to clear the message.

Resources

Typically, it is better to use computer-specific information in WiseScripts instead of hard-coding paths and so on. Following are several registry keys and environment variables that contain this information.
Registry Keys
Common Folders, Current User:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

Common Folders, Local Machine:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

Environment Variables
You can obtain a complete list of available environment variables by opening a command prompt and typing SET. The following table lists some common variables.
Environment Variable Represents
COMPUTERNAME Machine name of the computer
HOMEPATH Current user's home directory (Documents and Settings\User)
LOGONSERVER The server that validated the current logon
OS Current operating system name (example: Windows_NT)
USERDOMAIN The domain name the computer is logged on to
USERDNSDOMAIN     The fully qualified version of USERDOMAIN
USERNAME The current user's logon name

Monday, February 13, 2012

Troubleshooting SCCM ..Part II (Hardware Inventory)

Troubleshooting SCCM ..Part II (Hardware Inventory)


Hardware Inventory

Hardware inventory is a feature in itself and functions independent to the other features of SCCM, but it closely depends on a successful deployment.
SCCM Setup has to complete successfully. The Hardware inventory feature on the server side solely depends on setup and successful SQL install. All the tables from the default sms_def.mof should get correctly created in SQL with the right credentials.
Similarly, for the hardware inventory agent to function as per requirements on the Advanced client, the client setup should have completed successfully and the client should have access to the MP for the Advanced client. On the Advanced client the Inventory agent’s functionality is dependent on the running of the SMS Agent Host service (ccmexec).
The entire hardware inventory feature is dependent on the sms_def.mof file present in the clifiles.src\hinv folder on the SiteServer. If that file is deleted or made corrupt, hardware inventory feature on the clients would not report any valid hardware inventory data.
Client Side
For any inventory to start it has to be scheduled. This is downloaded during the initial policy download.
èInventoryAgent.Log
Inventory: Message type is InventoryAction
Inventory: Temp directory = C:\SMS_CCM\Inventory\Temp\
Inventory: Clearing old collected files.
Inventory: Opening store for action {00000000-0000-0000-0000-000000000001}
We can also manually trigger via the Configuration Manger Control Panel Applet or can  be triggered using sendsched.vbs.
The Client then checks the policy and determines if it needs to initiate a Full, Delta or Re-Sync. First scan will always be a Full Scan all subsequent scans are Deltas. Re-Sync request is sent by the server if no existing client record exists for the delta sent by a client.
If there is issue in receiving the policy you can check the communication between the client and the MP. Use the steps mentioned in the client reporting troubleshooting.
èInventoryagent.log
Inventory: Delta report without a previous Full report; will do a Full report.
Inventory: Action=Hardware ReportType=Full
Once the scan type (Full, Re-Sync, or Delta) has been determined, the Hardware Inventory Client Agent must now determine precisely what to inventory:
Based on the rules and scan type, configuration manager scans WMI and the registry. Results of scan are stored in WMI. Once compiled into WMI, the client generates an XML file. Advanced Client converts XML file to message file and are send to MP. These are as shown in the verbose Inventoryagent.log
Invetoryagent.log
Inventory: Message type is InventoryAction        InventoryAgent                1/31/2010 9:39:10 AM  384 (0x0180)
Inventory: Temp directory = C:\WINDOWS\system32\CCM\Inventory\Temp\           InventoryAgent                1/31/2010 9:39:10 AM  384 (0x0180)
Inventory: Clearing old collected files.                     InventoryAgent                1/31/2010 9:39:10 AM  384 (0x0180)
Inventory: Opening store for action {00000000-0000-0000-0000-000000000001} ...  InventoryAgent                1/31/2010 9:39:10 AM  384 (0x0180)
Inventory: Delta report without a previous Full report; will do a Full report.                   InventoryAgent                1/31/2010 9:39:10 AM  384 (0x0180)
Inventory: Action=Hardware ReportType=Full    InventoryAgent                1/31/2010 9:39:10 AM  384 (0x0180)
Inventory: Initialization completed in 0.020 seconds                  InventoryAgent                1/31/2010 9:39:10 AM  384 (0x0180)
Collection: Namespace = \\.\root\ccm\invagt; Query = SELECT __CLASS, __PATH, __RELPATH, Name, SMSID, Domain, SystemRole, SystemType, LocalDateTime FROM CCM_System; Timeout = 600 secs.         InventoryAgent                1/31/2010 9:39:10 AM  384 (0x0180)
Inventory: Message [Type=InventoryAction, ActionID={00000000-0000-0000-0000-000000000003}, Report=Full] already in queue. Message ignored.            InventoryAgent                        1/31/2010 9:39:10 AM  2452 (0x0994)
…………….
………………
…………………

Collection: Class "Win32_TSLicenseKeyPack" does not exist out.                   InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Collection: Namespace = \\.\root\cimv2; Query = SELECT __CLASS, __PATH, __RELPATH, Availability, Description, DeviceID, Manufacturer, Name, Status FROM Win32_IDEController; Timeout = 600 secs.         InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Collection: 34/51 inventory data items successfully inventoried.                  InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Inventory: Collection Task completed in 57.953 seconds          InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Inventory: 17 Collection Task(s) failed.                    InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Inventory: Temp report = C:\WINDOWS\system32\CCM\Inventory\Temp\96dbb66b-b57d-4812-95a6-cf21d7c7c44b.xml                     InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Inventory: Starting reporting task.   InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Reporting: 330 report entries created.                    InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Inventory: Reporting Task completed in 0.411 seconds            InventoryAgent                1/31/2010 9:40:08 AM  384 (0x0180)
Inventory: Successfully sent report. Destination:mp:MP_HinvEndpoint, ID: {9DAA9999-4535-4E5C-A6CB-CAD2D11BA960}, Timeout: 80640 minutes MsgMode: Signed, Not Encrypted                        InventoryAgent                1/31/2010 9:40:09 AM  384 (0x0180)
Inventory: Cycle completed in 62.961 seconds     InventoryAgent                1/31/2010 9:40:13 AM  384 (0x0180)
Inventory: Action completed.              InventoryAgent                1/31/2010 9:40:13 AM  384 (0x0180)

If inventory fails, to correct it you can check reinstalling the client and also check for any WMI issues. Follow the steps in WMI troubleshooting in the client reporting part for any WMI issues
This is the end of client side troubleshooting. Now once this is over you need to check the rest of the process in the server side.
Server Side
In the server the CCMExec on the MP processes the message and generates the XML file. File is stored in [1] \MP\Outboxes\Hinv.box



You can view this information from
MP_Hinv.Log
Hinv Retry: ******************* Start of Task *********************                 MP_HinvEndpoint            4/21/2010 10:39:15 AM                       4360 (0x1108)
Hinv Sax: loading C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\HinvAttachmentY3ZGIYW8.xml        MP_HinvEndpoint            4/21/2010 10:39:15 AM                        4360 (0x1108)
Delta report from client SQL, action description = Hardware  MP_HinvEndpoint            4/21/2010 10:39:15 AM                       4360 (0x1108)
Hinv Task: Translate report attachment to file "C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\HQG4Q6EI.MIF" returned 0   MP_HinvEndpoint                        4/21/2010 10:39:15 AM                       4360 (0x1108)
Hinv Retry: ******************* End of Task *********************                    MP_HinvEndpoint            4/21/2010 10:39:15 AM                       4360 (0x1108)
XML file is then parsed and used to create a .MIF file. This process can be monitored in the MP_Hinv.log
.MIF file is stored in the [2]\MP\Outboxes\Hinv.box
MP_Hinv.log
Hinv Retry: ******************* Start of Task *********************                 MP_HinvEndpoint            1/31/2010 9:32:23 AM  2580 (0x0A14)
Hinv Sax: loading C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\HinvAttachmentXM1YR1Q7.xml       MP_HinvEndpoint            1/31/2010 9:32:23 AM  2580 (0x0A14)
Full report from client DC, action description = Hardware        MP_HinvEndpoint            1/31/2010 9:32:23 AM  2580 (0x0A14)
Hinv Task: Translate report attachment to file "C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\H8TADQ8W.MIF" returned 0                         MP_HinvEndpoint                        1/31/2010 9:32:23 AM  2580 (0x0A14)
Hinv Retry: ******************* End of Task *********************                    MP_HinvEndpoint            1/31/2010 9:32:23 AM  2580 (0x0A14)
Management Point File Dispatch Manager copies the file from SMS\MP\Outboxes\Hinv.box to SMS\Inboxes\Dataldr.box . This process can be monitored in the MPFDM.log
MIF file is parsed and determines type of data to be inserted into the database. View dataldr.log to monitor progress, sql tracing can be enabled for detailed output and to further troubleshoot if MIF data is not processed and inserted to the database properly.
If the file is not received at this point need to check the communication between the server and the agent.
Dataldr.log
>> Add 1 files to process directory ...                       SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:25 PM  804 (0x0324)
Moving MIF file C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\HIZAHGPO.MIF to C:\Program Files\Microsoft Configuration Manager\inboxes\auth\dataldr.box\process\HIZAHGPO.MIF                     SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:25 PM  804 (0x0324)
Started the machine MIF processing thread, thread ID = AF4                       SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:25 PM  804 (0x0324)
Worker thread 2612 starting execution.                 SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:25 PM  2612 (0x0A34)
Done with job queueing.                        SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:26 PM  2804 (0x0AF4)
Blocking until completion.                      SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:26 PM  2804 (0x0AF4)
Thread: 0 is using GUID  SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:27 PM  2612 (0x0A34)
Thread: 2612 will use GUID GUID:76B6D180-F0B6-4689-B294-6CCE9033D7EB              SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:27 PM  2612 (0x0A34)
Processing Inventory for Machine: SQL   Version 1.5  Generated: 04/21/2010 14:44:19                   SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:27 PM  2612 (0x0A34)
Begin transaction: Machine=SQL(GUID:76B6D180-F0B6-4689-B294-6CCE9033D7EB) SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:28 PM  2612 (0x0A34)
Commit transaction: Machine=SQL(GUID:76B6D180-F0B6-4689-B294-6CCE9033D7EB)                     SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:30 PM  2612 (0x0A34)
Done: Machine=SQL(GUID:76B6D180-F0B6-4689-B294-6CCE9033D7EB) code=0 (16 stored procs in XHIZAHGPO.MIF)       SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:30 PM  2612 (0x0A34)
Done blocking until completion.          SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:30 PM  2804 (0x0AF4)
No more machine MIFs to be processed, terminating thread                        SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:30 PM  2804 (0x0AF4)
Shutting down Machine Writer.         SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:30 PM  2804 (0x0AF4)
Worker thread 2612 halting execution.                   SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:31 PM  2612 (0x0A34)
Finished processing 1 MIFs                  SMS_INVENTORY_DATA_LOADER   4/21/2010 2:44:35 PM  2804 (0x0AF4)


Once this is completed we should be able to see the data in the resource explorer.  If there is some failure at this point we can enable SQL logging and check the insertion of data. Also if you have issue with the component SMS_INVENTORY_DATA_LOADER then a site reset can also help.

Troubleshooting SCCM Part III ...Software Updates

Troubleshooting SCCM Part III ...Software Updates



Providing updates to software and maintaining managed resources is a reality of networked, distributed computing. An effective software update management process is necessary to maintain operational efficiency, overcome security issues, and maintain the stability of the network infrastructure. However, because of the changing nature of technology and the continual appearance of new security threats, the task of effective software update management can be challenging.
The Microsoft System Center Configuration Manager 2007 software updates feature provides a set of tools and resources that can help manage the complex task of tracking and applying software updates to client computers in the enterprise. Click any link in the following section for overview information about software updates.
For more details on how to do software updates using configuration manager please check this link http://technet.microsoft.com/en-us/library/bb680701.aspx

Troubleshooting

Server side

The component which takes care of software update is software update point (SUP). So first we need to check if the software update point is installed correctly. If installed correctly you will have the entries in the log SUPSetup.log as shown below

SUPSetup.log
===========
<04-27-2010 23:51:04> ====================================================================
<04-27-2010 23:51:04> SMSWSUS Setup Started....
<04-27-2010 23:51:04> Parameters: C:\PROGRA~1\MICROS~1\bin\i386\ROLESE~1.EXE /install /siteserver:SCCM SMSWSUS
<04-27-2010 23:51:04> Installing Pre Reqs for SMSWSUS
<04-27-2010 23:51:04>         ======== Installing Pre Reqs for Role SMSWSUS ========
<04-27-2010 23:51:04> Found 0 Pre Reqs for Role SMSWSUS
<04-27-2010 23:51:04>         ======== Completed Installion of Pre Reqs for Role SMSWSUS ========
<04-27-2010 23:51:04> Installing the SMSWSUS
<04-27-2010 23:51:04> Correct and supported WSUS Server version is installed.
<04-27-2010 23:51:04> Invoking process "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe" "C:\Program Files\Microsoft Configuration Manager\bin\i386\wsusmsp.dll"
<04-27-2010 23:51:30> Registered DLL C:\Program Files\Microsoft Configuration Manager\bin\i386\wsusmsp.dll
<04-27-2010 23:51:30> Installation was successful.

Once installed you need to make sure that it is configured the logs which can be of help are WCM.log and WSUSctrl.log. If you find errors then make sure that the WSUS is working well.  For the same you can check the following link http://technet.microsoft.com/en-us/library/dd939799(WS.10).aspx
The logs if configured correctly should look like this.

WSUSctrl.log
=============
SMS_EXECUTIVE started SMS_WSUS_CONTROL_MANAGER as thread ID 3432 (0xD68).                SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:33 PM                        3216 (0x0C90)
This is a WSUS Role as WSUS registry key exists.                        SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:33 PM                        3432 (0x0D68)
Found WSUS Admin dll of assembly version Microsoft.UpdateServices.Administration, Version=3.0.6000.273, Major Version = 0x30000, Minor Version = 0x17700111                        SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:33 PM                        3432 (0x0D68)
Found WSUS Admin dll of assembly version Microsoft.UpdateServices.Administration, Version=3.1.6001.1, Major Version = 0x30001, Minor Version = 0x17710001                        SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:33 PM                        3432 (0x0D68)
Found WSUS Admin dll of assembly version Microsoft.UpdateServices.Administration, Version=2.0.0.0, Major Version = 0x20000, Minor Version = 0x0                        SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:33 PM                        3432 (0x0D68)
The installed WSUS build has the valid and supported WSUS Administration DLL assembly version (3.1.7600.226)                SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:33 PM                        3432 (0x0D68)
Successfully connected to local WSUS server        SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:33 PM                        3432 (0x0D68)
Local WSUS Server Proxy settings are correctly configured as Proxy Name  and Proxy Port 80       SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:35 PM                        3432 (0x0D68)
Waiting for changes for 0 minutes     SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:35 PM                        3432 (0x0D68)
Timed Out...                       SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:35 PM                        3432 (0x0D68)
…………………..
…………………..
…………………..
                        SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:35 PM                        3432 (0x0D68)
There are no unhealthy WSUS Server components on WSUS Server SCCM                    SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:35 PM                        3432 (0x0D68)
Successfully checked database connection on WSUS server SCCM              SMS_WSUS_CONTROL_MANAGER  4/27/2010 11:51:38 PM                        3432 (0x0D68)

WCM.log
=========
This SCCM system is the Top Site where WSUS Server is configured to Sync from Microsoft Update (WU/MU) OR do not Sync.              SMS_WSUS_CONFIGURATION_MANAGER                        4/27/2010 11:50:36 PM                        5992 (0x1768)
Found WSUS Admin dll of assembly version Microsoft.UpdateServices.Administration, Version=3.0.6000.273, Major Version = 0x30000, Minor Version = 0x17700111                        SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:50:37 PM                        5992 (0x1768)
Found WSUS Admin dll of assembly version Microsoft.UpdateServices.Administration, Version=3.1.6001.1, Major Version = 0x30001, Minor Version = 0x17710001                        SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:50:37 PM                        5992 (0x1768)
Found WSUS Admin dll of assembly version Microsoft.UpdateServices.Administration, Version=2.0.0.0, Major Version = 0x20000, Minor Version = 0x0                        SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:50:37 PM                        5992 (0x1768)
The installed WSUS build has the valid and supported WSUS Administration DLL assembly version (3.1.7600.226)                SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:50:37 PM                      5992 (0x1768)
Successfully connected to server: SCCM.MYLAB.IN, port: 80, useSSL: False                   SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:51:23 PM                        5992 (0x1768)
Verify Upstream Server settings on the Active WSUS Server                        SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:51:23 PM                        5992 (0x1768)
Successfully configured WSUS Server settings and Upstream Server to Microsoft Update               SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:51:34 PM                        5992 (0x1768)
Successfully connected to server: SCCM.MYLAB.IN, port: 80, useSSL: False                   SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:51:39 PM                        5992 (0x1768)
……………………….
……………………….
STATMSG: ID=6617 SEV=E LEV=M SOURCE="SMS Server" COMP="SMS_WSUS_CONFIGURATION_MANAGER" SYS=SCCM SITE=LAB PID=3040 TID=5992 GMTDATE=Tue Apr 27 18:23:49.259 2010 ISTR0="" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0       SMS_WSUS_CONFIGURATION_MANAGER                        4/27/2010 11:53:49 PM                        5992 (0x1768)
completed unpublishing previous clients                 SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:53:49 PM                        5992 (0x1768)
completed checking for client deployment             SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:53:49 PM                        5992 (0x1768)
Successfully inserted the WSUS Enterprise Update Source object {A36F27F1-F657-437E-9EBF-8531FE189A6B}                     SMS_WSUS_CONFIGURATION_MANAGER          4/27/2010 11:54:03 PM                      5992 (0x1768)




Once you confirm that the WSUS configuration is over then you need to make sure that the SUP is able to synchronize with the Microsoft update catalogue site and the same can be checked in this log.

WSUSsyncmgr.log
===============
Performing sync on local request       SMS_WSUS_SYNC_MANAGER           4/27/2010 11:59:54 PM                        6112 (0x17E0)
STATMSG: ID=6701 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_WSUS_SYNC_MANAGER" SYS=SCCM SITE=LAB PID=3040 TID=6112 GMTDATE=Tue Apr 27 18:29:54.530 2010 ISTR0="" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0                      SMS_WSUS_SYNC_MANAGER           4/27/2010 11:59:54 PM                        6112 (0x17E0)
STATMSG: ID=6704 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_WSUS_SYNC_MANAGER" SYS=SCCM SITE=LAB PID=3040 TID=6112 GMTDATE=Tue Apr 27 18:30:18.547 2010 ISTR0="" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0                      SMS_WSUS_SYNC_MANAGER           4/28/2010 12:00:18 AM                        6112 (0x17E0)
Synchronizing WSUS server SCCM   SMS_WSUS_SYNC_MANAGER           4/28/2010 12:00:18 AM                       6112 (0x17E0)
Synchronizing WSUS server sccm.mylab.in ...     SMS_WSUS_SYNC_MANAGER           4/28/2010 12:02:16 AM                       5220 (0x1464)
sync: Starting WSUS synchronization                       SMS_WSUS_SYNC_MANAGER           4/28/2010 12:02:16 AM                       5220 (0x1464)
sync: WSUS synchronizing categories                      SMS_WSUS_SYNC_MANAGER           4/28/2010 12:02:44 AM                       5220 (0x1464)

……………..
,……………………

Synchronizing update e6d5e961-e5c4-4816-b414-648feba450b7                SMS_WSUS_SYNC_MANAGER           28/04/2010 5:53:10 PM                        4380 (0x111C)
Synchronizing update 35a0b603-61ce-4f1e-b2dd-3cc36cdf8b31                  SMS_WSUS_SYNC_MANAGER           28/04/2010 5:53:11 PM                        4380 (0x111C)
Synchronizing update 333bf753-7abb-4fce-a15f-a1862ecf838b                   SMS_WSUS_SYNC_MANAGER           28/04/2010 5:53:11 PM                        4380 (0x111C)
Synchronizing update 136df562-d188-4e79-8879-8d8082c97614:  Definition Update for Windows Defender - KB915597 (Definition 1.81.438.0)      SMS_WSUS_SYNC_MANAGER                        28/04/2010 5:53:12 PM                        4380 (0x111C)
Done synchronizing SMS with WSUS Server sccmcen.scs.in  SMS_WSUS_SYNC_MANAGER           28/04/2010 5:53:13 PM                        4380 (0x111C)
STATMSG: ID=6702 SEV=I LEV=M SOURCE="SMS Server" COMP="SMS_WSUS_SYNC_MANAGER" SYS=SCCMCEN SITE=CEN PID=1880 TID=3256 GMTDATE=Wed Apr 28 12:23:13.745 2010 ISTR0="" ISTR1="" ISTR2="" ISTR3="" ISTR4="" ISTR5="" ISTR6="" ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0           SMS_WSUS_SYNC_MANAGER           28/04/2010 5:53:13 PM                        3256 (0x0CB8)
Updated 3072 items in SMS database, new update source content version is 2              SMS_WSUS_SYNC_MANAGER           28/04/2010 5:53:13 PM                        3256 (0x0CB8)

Once the synchronization is successfully done, updates will be available in the update repository. You can then go ahead and create the deployment template and schedule for installation. On more details on how to please check the following link.


Once done if you check the status messages for your created update packages you will find the following status messages.

Severity       Type              Site code      Date / Time                         System         Component Message ID                        Description
Information                        Milestone    CEN                28/04/2010 4:21:28 PM                        SCCMCEN    SMS_DISTRIBUTION_MANAGER       2301              SMS Distribution Manager successfully processed package "TEST" (package ID = CEN00003).
Information                        Milestone    CEN                28/04/2010 4:21:27 PM                        SCCMCEN    SMS_DISTRIBUTION_MANAGER       2300              SMS Distribution Manager is beginning to process package "TEST" (package ID = CEN00003).
Information                        Milestone    CEN                28/04/2010 4:21:21 PM                        SCCMCEN    SMS_DISTRIBUTION_MANAGER       2330              SMS Distribution Manager successfully distributed package "CEN00003" to distribution point "["Display=\\SCCMCEN\"]MSWNET:["SMS_SITE=CEN"]\\SCCMCEN\".
Info
 Distribution Manager is beginning to process package "TEST" (package ID = CEN00003).
Information                        Audit              CEN                28/04/2010 4:20:59 PM                        SCCMCEN    Microsoft.ConfigurationManagement.dll               30068            User "SCS\Administrator" updated a package named " TEST  " (CEN00003) to the site distribution points.
Information                        Milestone    CEN                28/04/2010 4:12:14 PM                        SCCMCEN    SMS_DISTRIBUTION_MANAGER       2300              SMS Distribution Manager is beginning to process package "TEST" (package ID = CEN00003).
Information                        Milestone    CEN                28/04/2010 4:12:08 PM                        SCCMCEN    SMS_DISTRIBUTION_MANAGER       2301              SMS Distribution Manager successfully processed package "TEST" (package ID = CEN00003).
Information                        Milestone    CEN                28/04/2010 4:12:06 PM                        SCCMCEN    SMS_DISTRIBUTION_MANAGER       2330              SMS Distribution Manager successfully distributed package "CEN00003" to distribution point
Distribution Manager is beginning to process package "TEST" (package ID = CEN00003).
Information                        Audit              CEN                28/04/2010 4:11:21 PM                        SCCMCEN    Microsoft.ConfigurationManagement.dll               30125            User "SCS\Administrator" added new distribution points to a package named " TEST  " (CEN00003).
Information                        Audit              CEN                28/04/2010 4:11:20 PM                        SCCMCEN    Microsoft.ConfigurationManagement.dll               30000            User "SCS\Administrator" created a package named " TEST  " (CEN00003).


Once these steps are done then the rest of the things happens in the client.

Client Side

In the client side first thing we need to check is the locationservices.log to make sure that the correct SUP point is detected by the client, else make sure that the client is correctly reporting to the SCCM server and that the software update is enabled. Make sure that the server name and the port is specified correctly.

Locationservices.log
================
Calling back with the following WSUS locations LocationServices              4/29/2010 10:39:40 AM  2844 (0x0B1C)
WSUS Path='https://SCCMCEN.SCS.IN:443', Server='SCCMCEN', Version='2'         LocationServices              4/29/2010 10:39:40 AM         2844 (0x0B1C)
Calling back with locations for WSUS request {10066528-1C1B-4A0C-958B-F29ACBEDBBDF}          LocationServices                4/29/2010 10:41:31 AM  2844 (0x0B1C)
Calling back with the following distribution points          LocationServices              4/29/2010 11:27:23 AM  2552 (0x09F8)
Distribution Point='\\SCCMCEN.SCS.IN\SMSPKGC$\CEN00003\4ea80bd5-c8ac-4f98-be8a-1c18f24a34e4', Locality='LOCAL', DPType='SERVER', Version='6487', Capabilities='', Signature=''         LocationServices              4/29/2010 11:27:23 AM  2552 (0x09F8)

Now once the policy agent triggers the scan cycle the windows update agent in the client will contact the WSUS server which in our case is also the SUP point. Once the scan is successfully completed this information is send as state message to the SCCM server. This can be checked in windowsupadte.log or you can check WUAhandler.log under SCCM client log.

WUAHandler.log
==============
Async searching of updates using WUAgent started.       WUAHandler     4/29/2010 10:42:20 AM  3488 (0x0DA0)
Async searching completed.       WUAHandler     4/29/2010 11:24:21 AM  1496 (0x05D8)
Successfully completed scan.    WUAHandler     4/29/2010 11:24:25 AM  2752 (0x0AC0)
Its a WSUS Update Source type ({D4F72DDB-F6C4-4B05-835F-A8C23098857A}), adding it.              WUAHandler     4/29/2010 11:25:24 AM       2752 (0x0AC0)
Existing WUA Managed server was already set (https://SCCMCEN.SCS.IN:443), skipping Group Policy registration.                WUAHandler     4/29/2010 11:25:25 AM  2752 (0x0AC0)
Added Update Source ({D4F72DDB-F6C4-4B05-835F-A8C23098857A}) of content type: 2                WUAHandler     4/29/2010 11:25:25 AM       2752 (0x0AC0)
Async searching of updates using WUAgent started.       WUAHandler     4/29/2010 11:25:25 AM  2752 (0x0AC0)
Async searching completed.       WUAHandler     4/29/2010 11:26:28 AM  2396 (0x095C)
Successfully completed scan.    WUAHandler     4/29/2010 11:26:32 AM  3756 (0x0EAC)


Completion of scan is important and if the same is not successfully done you can take the help of the following link to troubleshoot the issues. This link is of WSUS troubleshooting but you can get hints to troubleshoot the error code.
Now when the policy agent triggers the software update deployment cycle the scan result is compared with the catalogue and then it downloads only the required updates and install on schedule. You can check the updatestore.log, updatedeploymemt.log for more details. You can also check windowsupdate.log for more details.

Updatedeployment.log
==================

Service startup system task                 UpdatesDeploymentAgent                   4/28/2010 7:49:39 PM  3468 (0x0D8C)
Software Updates client configuration policy has not been received.          UpdatesDeploymentAgent                   4/28/2010 7:49:39 PM  3468 (0x0D8C)
Software updates functionality will not be enabled until the configuration policy has been received. If this issue persists please check client/server policy communication.                        UpdatesDeploymentAgent                   4/28/2010 7:49:39 PM  3468 (0x0D8C)
Software Updates feature is disabled                       UpdatesDeploymentAgent                   4/28/2010 7:49:39 PM  3468 (0x0D8C)
Software Updates client configuration policy has not been received.          UpdatesDeploymentAgent                   4/28/2010 7:49:39 PM  3468 (0x0D8C)
Software updates functionality will not be enabled until the configuration policy has been received. If this issue persists please check client/server policy
communication.                UpdatesDeploymentAgent                   4/28/2010 7:49:39 PM  3468 (0x0D8C)
………………….
…………………
Evaluation initiated for (1) assignments.                 UpdatesDeploymentAgent                   4/29/2010 10:39:20 AM                       336 (0x0150)
Deadline received for assignment ({3B1C5820-953D-4EFB-BDB7-3ABEE4C9788D})      UpdatesDeploymentAgent                   4/29/2010 10:39:20 AM                       3344 (0x0D10)
Enforcement trigger will be effective when the current action completes UpdatesDeploymentAgent                   4/29/2010 10:39:20 AM                       3344 (0x0D10)
Message received: 'True'       UpdatesDeploymentAgent                   4/29/2010 10:39:30 AM                        3940 (0x0F64)
Evaluation initiated for (0) assignments.                 UpdatesDeploymentAgent                   4/29/2010 11:01:55 AM                       4064 (0x0FE0)
……………………………….
DetectJob completion received for assignment ({3B1C5820-953D-4EFB-BDB7-3ABEE4C9788D})     UpdatesDeploymentAgent                   4/29/2010 11:26:59 AM                       3856 (0x0F10)
……………………..
Added update (Site_D4F72DDB-F6C4-4B05-835F-A8C23098857A/SUM_9fb3050e-26f2-4ccc-b9b0-b453ff58aaa9) to the targeted list UpdatesDeploymentAgent                   4/29/2010 11:26:59 AM                      3856 (0x0F10)
Added update (Site_D4F72DDB-F6C4-4B05-835F-A8C23098857A/SUM_de919dec-2021-474a-8a7f-d632c2068146) to the targeted list                      UpdatesDeploymentAgent                        4/29/2010 11:26:59 AM                       3856 (0x0F10)
Added update (Site_D4F72DDB-F6C4-4B05-835F-A8C23098857A/SUM_d2e84b36-f0fd-4434-825d-a753a338b0bd) to the targeted list                      UpdatesDeploymentAgent                        4/29/2010 11:26:59 AM                       3856 (0x0F10)
…………………..
……………………
Update (Site_D4F72DDB-F6C4-4B05-835F-A8C23098857A/SUM_de919dec-2021-474a-8a7f-d632c2068146) Progress: Status = ciStateDownloading, PercentComplete = 83, Result = 0x0                        UpdatesDeploymentAgent                   4/29/2010 11:27:36 AM                       1068 (0x042C)
Progress received for assignment ({3B1C5820-953D-4EFB-BDB7-3ABEE4C9788D})      UpdatesDeploymentAgent                   4/29/2010 11:27:38 AM                       12 (0x000C)
DownloadJob completion received for assignment ({3B1C5820-953D-4EFB-BDB7-3ABEE4C9788D})                      UpdatesDeploymentAgent                   4/29/2010 11:27:38 AM                       12 (0x000C)
EnumerateUpdates for action (UpdateActionInstall) - Total visible updates = 3               UpdatesDeploymentAgent                   4/29/2010 11:27:38 AM                       2960 (0x0B90)
Starting install for assignment ({3B1C5820-953D-4EFB-BDB7-3ABEE4C9788D})              UpdatesDeploymentAgent                   4/29/2010 11:27:38 AM                       12 (0x000C)

………………….
Update (Site_D4F72DDB-F6C4-4B05-835F-A8C23098857A/SUM_de919dec-2021-474a-8a7f-d632c2068146) Progress: Status = ciStateInstalling, PercentComplete = 100, DownloadSize = 0, Result = 0x0                         UpdatesDeploymentAgent                   4/29/2010 11:31:26 AM                       440 (0x01B8)
Update (Site_D4F72DDB-F6C4-4B05-835F-A8C23098857A/SUM_de919dec-2021-474a-8a7f-d632c2068146) Progress: Status = ciStatePendingSoftReboot, PercentComplete = 0, DownloadSize = 0, Result = 0x0           UpdatesDeploymentAgent                   4/29/2010 11:31:31 AM                       3568 (0x0DF0)
CTargetedUpdatesManager - Job completion received.           UpdatesDeploymentAgent                   4/29/2010 11:31:32 AM                       496 (0x01F0)
Job Id = {A807D023-9E41-4FE5-A528-6120C46C1134}              UpdatesDeploymentAgent                   4/29/2010 11:31:32 AM                       496 (0x01F0)
No pending install assignment             UpdatesDeploymentAgent                   4/29/2010 11:31:33 AM                       440 (0x01B8)
EnumerateUpdates for action (UpdateActionInstall) - Total visible updates = 3               UpdatesDeploymentAgent                   4/29/2010 11:31:33 AM                       2236 (0x08BC)
No installations in pipeline, notify reboot.               UpdatesDeploymentAgent                   4/29/2010 11:31:33 AM                       440 (0x01B8)
Notify reboot with deadline = Thursday, Apr 29, 2010. - 11:31:33, Ignore reboot Window = False                        UpdatesDeploymentAgent                   4/29/2010 11:31:33 AM                       440 (0x01B8)

The execution manager will have the following entries

Execmgr.log
==========
Mandatory execution requested for program Software Updates Program and advertisement {3D49D216-341B-4456-B52C-A0A480C06BEC}           execmgr       4/29/2010 11:27:50 AM                        2188 (0x088C)
Creating mandatory request for advert {3D49D216-341B-4456-B52C-A0A480C06BEC}, program Software Updates Program, package {3D49D216-341B-4456-B52C-A0A480C06BEC}                        execmgr       4/29/2010 11:27:50 AM                       2188 (0x088C)
CExecutionRequest::Overriding Service Windows as per policy.                   execmgr       4/29/2010 11:27:50 AM                       2188 (0x088C)
Execution Manager timer has been fired.              execmgr       4/29/2010 11:27:50 AM                       3256 (0x0CB8)
Executing program  in Admin context                       execmgr       4/29/2010 11:27:50 AM                       2188 (0x088C)
Execution Request for package {3D49D216-341B-4456-B52C-A0A480C06BEC} program Software Updates Program state change from NotExist to NotifyExecution                 execmgr                        4/29/2010 11:27:50 AM                       2188 (0x088C)
Executing program as an update.      execmgr       4/29/2010 11:27:51 AM                       2188 (0x088C)
Executing Update Program                   execmgr       4/29/2010 11:27:51 AM                       2188 (0x088C)
Updates Installation started for the passed command line       execmgr       4/29/2010 11:27:51 AM                       2188 (0x088C)
Looking for MIF file to get program status             execmgr       4/29/2010 11:31:31 AM                       440 (0x01B8)
Script for  Package:{3D49D216-341B-4456-B52C-A0A480C06BEC}, Program: Software Updates Program succeeded with exit code 0   execmgr       4/29/2010 11:31:31 AM                       440 (0x01B8)
Execution is complete for program Software Updates Program. The exit code is 0, the execution status is Success                 execmgr       4/29/2010 11:31:31 AM                       440 (0x01B8)
The user has logged off.                        execmgr       4/29/2010 11:38:13 AM                       2788 (0x0AE4)

Once update is installed, then depending on the reboot setting the system will be rebooted. This information is tracked using

RebootCoordinator.log
==================
Shutdown is already in progress        RebootCoordinator          4/29/2010 11:38:10 AM                       3792 (0x0ED0)
Reboot initiated                 RebootCoordinator          4/29/2010 11:38:10 AM                       3792 (0x0ED0)
User logoff notification received         RebootCoordinator          4/29/2010 11:38:13 AM                       2788 (0x0AE4)
Shutdown is already in progress        RebootCoordinator          4/29/2010 11:38:17 AM                       2788 (0x0AE4)
Reboot initiated                 RebootCoordinator          4/29/2010 11:38:17 AM                       2788 (0x0AE4)

For information on the other logs you can check the following link which will give you more information on the logs which you can use for troubleshooting.

The other links which will be of help to you

Configuring Software Updates :  http://technet.microsoft.com/en-us/library/bb633119.aspx  
Software Updates Security Best Practices and Privacy Information:  http://technet.microsoft.com/en-us/library/bb633068.aspx
Troubleshooting Software Updates :  http://technet.microsoft.com/en-us/library/bb693492.aspx 
Technical Reference for Software Updates :  http://technet.microsoft.com/en-us/library/bb693784.aspx