Application repackaging – Active Setup & Windows Installer Repair

If you repackage or deploy applications you need to know about Active Setup and Windows Installer Repair

The best methods are documented first, but also other alternative ways.

Method I

Active Setup Method:

This is one of the best practices in MSI Packaging which uses the native Active Setup behavior of Windows and Windows Installer HKCU keys repair techniques.

One should follow these specific steps while using this method:

  1. Make sure all HKCU keys in the MSI Package that we are creating are under structured component names like CurrentUser, CurrentUser1, etc.
  2. The Package author should be able to judge and set the key path for that Component properly.
  3. As per Microsoft Component guidelines, make sure the components containing HKCU keys are as few in count as possible, for example only one component (CurrentUser) with all HKCU keys with best key path set is the best practice.
  4. Create the following registry keys under the main hive:
  1. HKLMSoftwareMicrosoftActive SetupInstalled Components{GUID of the MSI}
  2. ComponentID=PackageName_ComponentName
  3. StubPath=[SystemFolder]msiexec.exe /fu {Product Code of the MSI} /q
  4. Version=ProductVersion

The principle of Active Setup behavior is when a new user logs on for the first time, then the Active Setup will perform a checksum between HKLMSoftwareMicrosoftActive SetupInstalled Components{GUID of the MSI} and HKCUSoftwareMicrosoftActive SetupInstalled Components{GUID of the MSI}; and if the GUID is not present under HKCU, then it performs all actions which are under that main hive (StubPath, Version) and populates the GUID under HKCU. The main Advantage of Active Setup is it performs an action only once per User with the Checksum behavior by matching the entries under HKLM and HKCU.

Method II

Active Setup Method:

This method can be used for both MSIs and Non-MSIs

Create a silent SMS script or Wise Script (for eg:-Script.exe) which will create the needed HKCU registry entries for the application. Then place that EXE in the Application [INSTALLDIR] in your MSI Pkg or Executable binary memory.

Then create the following additional registry entries in the MSI Package or within the Script whichever is applicable:

HKLMSoftwareMicrosoftActive SetupInstalled Components{GUID or AppName}

ComponentID=PackageName_ComponentName

StubPath=”[INSTALLDIR]Script.exe”

Version=ProductVersion

 

The Active Setup performs the regular checksum (comparison of entries under) HKLM and HKCU and if the respective unique GUID or AppName is not present under HKCU hive, then it will perform all actions (StubPath, Version) and populates the GUID or AppName under HKCU hive too. This is only once per user — for the first time — to populate HKCU hive.

Method I and method II use the Active Setup feature, and One should understand the advantages of one over the other. Method I requires source resiliency to populate HKCU keys, where as method II does not require this as the Script.exe does everything.

Method I and method II can be used in any scenarios like if Advertised entry points are present or NOT present.

Method III

Windows Installer repair method

Typically the body of the script will be;

Check for the existence of a Flag key under
HKCUSoftwareCompany NameApplications{ProductName][productversion]
Installed=True

If the key exists then quit else initiate the Windows Installer repair to populate HKCU keys:

Msiexec /fu {Product Code of the MSI} /q

 

And edit and create registry key (Basically a Flag Key which can be any key which your firm adopts)
HKCUSoftwareXYZ*Applications{ProductName][productversion]
Installed=True
End
* XYZ= Name of the organization Company
And keep this script exe in HKLMSoftwareMicrosoftWindowsCurrentVersionRun.

One should keep in mind that the /p switch can also be used to repair files (populate) user-specific data (Profile data) with the following syntax:

Msiexec /fup {Product Code Of the MSI) /q

 

Method IV

Silent empty exe with valid shortcut:

Create a silent empty exe and its Advertised shortcut and place both of them in the Application [INSTALLDIR]. And use them as entry points to trigger healing to populate HKCU keys.

Microsoft System Center 2012 R2 Configuration Manager – Clients for Additional Operating Systems has been updated

The Clients for Additional Operating Systems allow you to manage Apple Mac, UNIX and Linux computers using System Center 2012 R2 Configuration Manager

Version:
Date Published:
1.0.0.7020 10/23/2013
File name:
File size:
ConfigMgr Clients for Linux.exe 46.7 MB
ConfigMgr Clients for AIX.exe 115.7 MB
ConfigMgr Clients for HP-UX.exe 49.0 MB
ConfigMgr Clients for Solaris.exe 57.2 MB
ConfigmgrMacClient.msi 5.4 MB

Microsoft System Center 2012 R2 Configuration Manager supports the management of Apple Mac clients. The client for Mac computers allows you to discover Mac OS X devices, collect inventory, manage settings, and deploy applications and patches using your Configuration Manager environment.
Microsoft System Center 2012 R2 Configuration Manager supports the management of UNIX and Linux servers. The clients for UNIX and Linux extends the scope of your Configuration Manager environment to collect inventory, deploy software, and run reports about UNIX and Linux servers in your enterprise. The client operates as a workgroup client that is managed by Configuration Manager.
Mac Client: The following Mac versions are supported in this release:

  • Mac OS X 10.6 (Snow Leopard)
  • Mac OS X 10.7 (Lion)
  • Mac OS X 10.8 (Mountain Lion)

The following scenarios are supported through the Mac client in Microsoft System Center 2012 R2 Configuration Manager Preview:

  • Discovery – Discovers Mac OS X system in Active Directory and through network discovery
  • Hardware Inventory – Provides hardware inventory and auditing of computers running Mac OS X, including a list of installed software similar to add/remove programs for Windows systems.
  • Settings Management – Ensures computers running Mac OS X comply with company policies using scripts and preference list management.
  • Application Deployment – Distributes required software via app model.
  • Software Updates Management – Distributes patches utilizing Software Distribution and Settings management features.

UNIX/Linux Client: The following UNIX and Linux versions are supported in this release.

  • AIX Version 7.1, 6.1, 5.3
  • Solaris Version 11, 10, 9
  • HP-UX Version 11iv2 , 11iv3
  • RHEL Version 6 , 5, 4
  • SLES Version 11, 10, 9
  • CentOS Version 6, 5
  • Debian Version 6, 5
  • Ubuntu Version 12.4 LTS, 10.4 LTS
  • Oracle Linux 6, 5

The following scenarios are supported by the UNIX and Linux clients:

  • Hardware Inventory – Hardware inventory can be viewed through Resource Explorer and can be used to create collections of UNIX and Linux computers.
  • Software Inventory – Through hardware inventory the list of natively installed software can be gathered from the UNIX and Linux computers – similar to add/remove programs for Windows systems.
  • Software Distribution – Deploy new software, update existing software and apply OS patches to collections of UNIX/Linux computers (using a package and program). Run arbitrary maintenance scripts on a collection of UNIX/Linux servers.
  • Secure and Authenticated Communications
  • Consolidated Reports

http://www.microsoft.com/en-us/download/details.aspx?id=39360

 

Task Sequence Fails in Configuration Manager if Software Updates Require Multiple Reboots

 

If a Configuration Manager Task Sequence that leverages the Install Software Updates step installs a software update that triggers multiple reboots, after successfully running the Install Software Updates task, the task sequence can fail with the following error message:

“Task Sequence environment not found”
To resolve this issue, we recommend that you apply any updates that require dual restarts by using the usual Software Updates feature of Configuration Manager instead of using task sequences. The following software updates were reported as requiring multiple restarts. This article will be updated as more updates are reported.
2862330

(http://support.microsoft.com/kb/2862330/ )

MS13-081: Description of the security update for 2862330: October 8, 2013

2771431

(http://support.microsoft.com/kb/2771431)

A servicing stack update is available for Windows 8 and Windows Server 2012

2871777

(http://support.microsoft.com/kb/2871777)

A servicing stack update is available for Windows RT, Windows 8, and Windows Server 2012: September 2013

2821895

(http://support.microsoft.com/kb/2821895)

A servicing stack update is available for Windows RT and Windows 8: June 2013

2545698

(http://support.microsoft.com/kb/2545698/ )

Text in some core fonts appears blurred in Internet Explorer 9 on a computer that is running Windows Vista, Windows Server 2008, Windows 7, or Windows Server 2008 R2

2529073

(http://support.microsoft.com/kb/2529073/ )

Binary files in some USB drivers are not updated after you install Windows 7 SP1 or Windows Server 2008 R2 SP1

Read the full article: http://support.microsoft.com/kb/2894518

 

 

New Platform Support in ConfigMgr 2012 R2

When Microsoft releases ConfigMgr 2012 R2 available on October 18th, along with all the other products, it will come with support for the following new platforms:

Site server and site system support will be added for the following operating systems:

  • Windows Server 2012 R2 Standard
  • Windows Server 2012 R2 Datacenter

Client support will be added for the following operating systems:

  •  Windows 8.1 Pro
  • Windows 8.1 Enterprise
  • Windows Server 2012 R2 Standard
  • Windows Server 2012 R2 Datacenter

Download the Windows Assessment and Deployment Kit (ADK) for Windows 8.1

The Windows Assessment and Deployment Kit (Windows ADK) is a collection of tools that you can use to customize, assess, and deploy Windows operating systems to new computers.

Supported Operating System

To install the Windows ADK, your computer must be running one of the following operating systems:

• Windows 8.1
• Windows 8
• Windows 7
• Windows Server 2012 R2
• Windows Server 2012
• Windows Server 2008 R2

Direct Download Link: http://download.microsoft.com/download/6/A/E/6AEA92B0-A412-4622-983E-5B305D2EBE56/adk/adksetup.exe

Serialized Editing of Data Objects in ConfigMgr2012 (SEDO)

A few facts about SEDO

  • 30 minute timeout for the lock – so if I am not active the lock goes away after 30 minutes.
  • Another admin want to edit the object, in this case a task sequence I can press “Retry Edit” and if the first admin have been inactive more than five minutes then control is transferred to the Admin requesting to edit it. But in difference to SCCM 2007, there will not be conflict as I as the first admin cannot save the changes I make so there are no conflicts created.
  • Admin UI crash can cause Locks

When the UI crashes and causes locks, you can easily unlock or locate the Locks

run sql mangement studio against your DB

Show locks: select * from SEDO_LockState where LockStateID <> 0

Delete locks:  delete from SEDO_LockState where id=’PLACE ID FROM ABOVE HERE’

After installing IE10, sysprep fail with error: SYSPRP LaunchDll:Could not load DLL C:WindowsSysWOW64iesysprep.dll[gle=0x000000c1]

This took me quite some time to figure out.

When running a build and capture task sequece from ConfigMgr, it won’t give any errors

Even after the image is captured and ready for re-deployment, the error appears when trying to run Setup Windows and Configmgr from a deployment task sequence. It would just break/stop right in the middel of that process, leaving your with pretty mush a useless deployment

Solution:

Set permission for group Administrators ( Full Control ) to

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepCleanup

Value Name

{EC9FE15D-99DD-4FB9-90D5-5B56E42A0F80}

Value Data

C:WindowsSysWOW64iesysprep.dll,Sysprep_Cleanup_IE

replace with

C:WindowsSystem32iesysprep.dll,Sysprep_Cleanup_IE

Set permission for group Administrators ( Full Control ) to

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepGeneralize

Value Name

{EC9FE15D-99DD-4FB9-90D5-CE53C91AB9A1}

Value Data

C:WindowsSysWOW64iesysprep.dll,Sysprep_Generalize_IE

replace with

C:WindowsSystem32iesysprep.dll,Sysprep_Cleanup_IE

Set permission for group Administrators ( Full Control ) to

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepSpecialize

Value Name

{EC9FE15D-99DD-4FB9-90D5-676C338DC1DA}

Value Data

C:WindowsSysWOW64iesysprep.dll,Sysprep_Cleanup_IE

replace with

C:WindowsSystem32iesysprep.dll,Sysprep_Cleanup_IE

setting this from a batch file:

IEhotfix.cmd:

regini -m \%computername% iesysprep.dll.txt  reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepCleanup /v {EC9FE15D-99DD-4FB9-90D5-5B56E42A0F80} /t REG_SZ /d “C:WindowsSystem32iesysprep.dll,Sysprep_Cleanup_IE” /f  reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepGeneralize /v {EC9FE15D-99DD-4FB9-90D5-CE53C91AB9A1} /t REG_SZ /d “C:WindowsSystem32iesysprep.dll,Sysprep_Cleanup_IE” /f  reg add HKLMSOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepSpecialize /v {EC9FE15D-99DD-4FB9-90D5-676C338DC1DA} /t REG_SZ /d “C:WindowsSystem32iesysprep.dll,Sysprep_Cleanup_IE” /f

iesysprep.dll.txt

HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepCleanup [1] HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepGeneralize [1] HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetupSysprepSpecialize [1]

ConfigMgr 2012 SP1 issues with OSDPreseveDriveLetter

Ran into this issue when trying deploy an existing image – the image was created without the propertly OSDPreseveDriveLetter in the Build and Capture task sequence.

My deployment task sequence kept failing Setup Windows and Configmgr.
The CCM client installed on the system ended up broken

The error messages from ccmsetup.log

C:WINDOWSccmsetup{1AF71F68-6089-4211-ADDC-06DF40606141}client.msi installation failed. Error text: ExitCode: 1603
– Client installation has failed too many times. Ccmsetup will now abort.

Solution:

– Add OSDPreseveDriveLetter=False to Build and Capture Task sequecen

I really wanted to use the image that i already had created, so here is what i did:

1. Added the OSDPreseveDriveLetter=False in my deployment task sequecen
2. Added /forceinstall /SMSMP=FQDN /SMSSLP=FQDN to step Setup Windows and ConfigMgr