Pages

Monday, 25 June 2012

Setup is unable to connect to SQL server error while installing SCCM 2012


 Setup is unable to connect to SQL Server with the connection information provided. Verify the following:

- The SQL Server and instance names are entered correctly
- The specified SQL Server instance is not configured to use dynamic ports
- If a firewall is enabled on the SQL Server, inbound rules exist to allow connections to the correct ports if not manually create them 
- The account used to run Setup has permissions to connect to the specified SQL server instance
- the account should administrative privileges on the machine





Resolution: 

Open the “SQL Server Configuration manager” and Naviagte to The Protocols of your SQL Instance in the “SQL Server Network Configuration”
Enable “Named Pipes” and “TCP/IP”
Restart the SQL Service Instance within the SQL Server Services:


This seems to be a common issue during the SCCM 2012 setup:  
Verify also that you are running the one of the supported  SQL versions:
- SQL Server 2008 SP2 with Cumulative Update 9
- SQL Server 2008 SP3 with Cumulative Update 4
- SQL Server 2008 R2 with SP1 and Cumulative Update 6
- SQL Express no longer valid for SCCM 2012

Friday, 22 June 2012

What is Deferred Custom Action





The purpose of a deferred execution custom action is to delay the execution of a system change to the time when the installation script is executed.



This differs from a regular custom action, or a standard action, in which the installer executes the action immediately upon encountering it in a sequence table or in a call to MsiDoAction.


A deferred execution custom action enables a package author to specify system operations at a particular point within the execution of the installation script.


The installer does not execute a deferred execution custom action at the time the installation sequence is processed. Instead the installer writes the custom action into the installation script.


1. Should be placed between install initialize and install finalize.
2. Does not have access to MSIDATABASE in deferred execution.




MSI Upgrade Table



The Upgrade table contains information that’s used when an Installer database is used to make a major upgrade to an existing product. This table contains following columns:



UpgradeCode:
The UpgradeCode property in this column specifies the upgrade code of all products that are to be detected by the FindRelatedProducts action. Unlike the ProductCode, different products may share the same UpgradeCode.

VersionMin:
This column specifies the minimum version to be upgraded. Lower boundary of the range of product versions detected by FindRelatedProducts. A null value means there is no lower bound on the version to be upgraded.

VersionMax:
This column specifies the maximum version to be upgraded. Upper boundary of the range of product versions detected by the FindRelatedProducts action. A null value means there is no upper bound on the version to be upgraded.

Language:
This column contains the set of languages detected by FindRelatedProducts that are to be upgraded and are separated by semicolons. A null value means that any language can be upgraded.

Attributes:
This column can contain any combination of the bit flags as shown in below tables:
Bit flag ( decimal) 
Attribute
1
To enable the MigrateFeatureStates action
2
To detect but not change previous versions
4
To install the new version even if the old version can’t be removed
256
To include VersionMin in the versions upgraded
512
To include VersionMax in the version to be upgraded
1024
To upgrade all languages except those listed in the Language column

Remove:
This column contains a comma-delimited set of names of existing features to be removed.

ActionProperty:
When the FindRelatedProducts action detects a related product installed on the system, it appends the product code to the property specified in this field. The property specified in this column must be a public property and the package author must add the property to the SecureCustomProperties property. Each row in the Upgrade table must have a unique ActionProperty value. After FindRelatedProducts, the value of this property is a list product codes, separated by semicolons (;), detected on the system. 


MSI Registry Table



This table holds all the miscellaneous (that is, not directly related to COM or COM+) information that the Installer needs to write to the Registry to install the application. The Registry table is used by the WriteRegistryValues action. This table contains the following columns:



Registry:
This column is an arbitrary key for the table which is used to identify a registry record.

Root:
This column indicates the Registry hive to be written to. It must have one of the values shown in below table.

Constant

Value

Explanation

None (Empty)

-1
i) For a per-user installation, writes to HKEY_CURRENT_USER.
ii) For a per-machine installation, Writes to HKEY_LOCAL_MACHINE.

msidbRegistryRootClassesRoot

0

HKEY_CLASSES_ROOT

msidbRegistryRootCurrentUser

1
HKEY_CURRENT_USER

msidbRegistryRootLocalMachine

2
HKEY_LOCAL_MACHINE

msidbRegistryRootUsers

3
HKEY_USERS


Key:
The Registry key to be written.

Name:
This column contains the name of the Registry value being written. If the column is null, then the value is written to the default for the Registry key. If the Value column is null, then this column should contain one of the special characters
Special Character
Corresponding Action
+
To create the key when the component is
Installed.

-
To delete the key when the component is uninstalled

*
To create the key on installation and delete it on uninstallation


Value:
This is the actual data to write to the Registry value.
Special Character.
Meaning
If the value starts with #x

Stored as a hexadecimal value.

If the value starts with #%

Stored as an expandable string.

If the value starts with #

Stored as an integer.

The special string [~] is stored as a null.

If this string occurs, the value is stored as a list of strings.

If the string starts with [~]
The value is appended to any existing value.

If the string ends with [~]
The value is prepended to any existing value.

If the value starts with ##
Stored as a string starting with a single # sign.


Component:
This is a foreign key to the Component table that identifies the component controlling this Registry operation.


MSI Shortcut Table



Shortcut table holds the information the application needs, to create shortcuts on the user's computer. Shortcut table has the following columns:





Shortcut:
This column contains the name of the shortcut.

Directory:
This column specifies the directory in which the Shortcut file is created.

Name:
The localizable name of the shortcut to be created

Component:
 This column references to the name of the component that contains the shortcut.

Target:
The value in this column varies for advertised and non-advertised shortcuts. For advertised shortcuts the value in this column references to the Feature which contains the component that owns the shortcut. And in the case of non-advertised shortcuts the value in this column will be formatted string, and this particular formatted string will a folder or file containing the shortcut. To convert the non-advertised shortcuts into advertised shortcut resolve the formatted string to its full path.

 Arguments:
This particular column references to the command-line arguments for the shortcut.

Description:
This column refers to the description of the shortcut.

Hotkey:
Authors of installation packages are generally recommended not to set this option, because the setting of this option can add duplicate hotkeys to a user's desktop.

Icon:
This is a foreign key to the Icon table. If this is null, the icon in the target file is used.

IconIndex:
This must be a non negative integer.

ShowCmd:
The Show command for the application window.

Value
Style
1
SW_SHOWNORMAL
3
SW_SHOWMAXIMIZED
7
SW_SHOWMINNOACTIVE

WKDir: This column contains the working directory of the shortcut.