Thursday, August 24, 2017

Packaging Pulsonix 9.1 in SCCM (Part 2 of 2)

In Part 1 we added the base 9.1 installer into the Software Center. But Pulsonix updates regularly and these updates often fix bugs so let's get it added for our Engineers.

Unfortunately, it is not currently possible to perform a silent install with the update exe. Perhaps you could watch it with ProcMon to catch all the changes to the registry and then xcopy over all of the updated files with a script but this is more work than I'm currently willing to put into it right now. Since we don't have a very large user base we can just run this installer in Interactive mode and our users can just click the "Install" button.


  • First things first, get your source files to a working directory and a fresh testing computer (VM's are best for this as it is easy to revert to a previous snapshot if you encounter any strangeness)
  • Install it and observe the behavior
    • It requires local admin rights
    • Change allows you to unzip the new files to a different location
    • List shows you what files are being updated
    • Install Now does exactly that.

  • Based on this info we'll do an interactive, system based installation. 
  • Go ahead an copy your update file to your SCCM Sources$ directory

  • In SCCM Console go to Software Library > Applications > Create Application
  • Specify general the info

  • Fill out the app catalog info (making it pretty is a good idea)

  • Add a Deployment Type = Script
  • Name = Pulsonix 91 6869 update installer
  • Enter the content info
    • Source = your Sources$ directory
    • Installation Program = Pulsonix91_update-6868-to-6869.exe
    • Uninstallation Program = "C:\Program Files (x86)\InstallShield Installation Information\{9121D81B-4FF0-4DA9-A171-3117CD6D182B}\setup.exe" -runfromtemp -l0x0409  -removeonly

  • Detection Method*
    • File system
    • Path: %ProgramFiles(x86)%\Pulsonix9.1
    • File: Pulsonix.exe
    • File is associated with 32bit app on 64bit systems
    • File must satisfy the following rule
      • Date Modified equals 8/9/2017 12:10:38 PM

  • User Experience - make it an interactive install
    • Install for System
    • Only when a user is logged on
    • Normal
    • Check Allow users to view and interact with the program

  • Requirements = none
  • Dependencies
    • Add Pulsonix 9.1


*We only have the date modified detection method for this update since it does not modify the "DispalyVersion" key in the registry.

Done!

Go ahead and deploy and test your new app.

Packaging Pulsonix 9.1 in SCCM (Part 1 of 2)

Today we will add Pulsonix 9.1 and update 6869 to the Software Center for use by our Engineering Dept. This will be part 1 of a 2 part post. Ideally we would want an unattended/silent install that can be completed quickly for all users with minimum effort on their part. This is possible with the 9.1 installer but so far not possible with the updates.

I received the source files from the engineers who got them directly from Pulsonix. The primary 9.1 installer is an archive containing an installshield executable. So go ahead and use 7Zip to unzip the files to a working directory. Once done you should see the installer files as below:



Now there's a critical file not pictured here; the setup.iss file used to configure defaults. Read up on this great post on how to get this from installshield as well as other good info on working with installers.

Essentially what we will do is run the installer from command line with a "-r" switch to record the steps and generate this .iss file.


  • Uninstall any previous version of Pulsonix you have (or preferably use a clean system that has never had it installed in the first place)
  • Open an elevated command prompt
  • cd to your working directory
  • run "setup.exe -r"
  • Complete the setup process by clicking next and selecting options. For me we want the following:
    • Accept EULA
    • Install Pulsonix as a Network License Client
      • Computer = [name of our license server]
      • Port = leave as default
    • Customer Info:
      • UserName = %username%
      • Company Name = [company name]
      • Install for = Anyone who uses PC
    • Destination = leave as default (usually program files (x86))
    • Data Files = Place data with Documents
      • Destination = leave as default (public user folder)
    • Complete Install
    • Uncheck "create desktop icon"*
    • Next Next, done
  • Once the install is complete go grab the setup.iss file from C:\windows\
  • Copy it into our source file directory


*We don't want icons on the desktop because later we will be installing this as system, preventing our end users (standard rights) from deleting the icon if they don't like it.

Now let's get to packaging in SCCM

  • Copy the files to a new folder in your Sources$ directory


  • In SCCM Console go to Software Library > Applications > Create Application
  • Specify general the info


  • Fill out the app catalog info - I like to add an icon and description for my end users to make it pretty.

  • Add a Deployment Type

  • Since we don't have an MSI select Type = Script

  • Fill out the general info

  • Fill out the Content Info
    • Location = the location in the Sources$ folder where you copied the files 
    • Installation Program = "setup.exe" /s /sms 
    • **Uninstallation Program = "C:\Program Files (x86)\InstallShield Installation Information\{9121D81B-4FF0-4DA9-A171-3117CD6D182B}\setup.exe" -runfromtemp -l0x0409  -removeonly

  • For Detection Method we'll add several to be thorough
    • Method 1 - pulsonix.exe date modified
      • File system
      • Path: %ProgramFiles(x86)%\Pulsonix9.1
      • File: Pulsonix.exe
      • File is associated with 32bit app on 64bit systems
      • File must satisfy the following rule
        • Date Modified equals 7/17/2017 2:44:46 AM

    • Method 2 - registry DisplayVersion
      • Hive: HKLM
      • Key: SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{9121D81B-4FF0-4DA9-A171-3117CD6D182B}
      • Value: DisplayVersion
      • Data: Version
      • Must satisfy the following: Greater than or equal to 9.1

    • ***Method 2 - registry DisplayVersion
      • Hive: HKLM
      • Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{9121D81B-4FF0-4DA9-A171-3117CD6D182B}
      • Value: DisplayVersion
      • Key is associated with 32bit app on 64 bit systems
      • Data: Version
      • Must satisfy the following: Greater than or equal to 9.1

    • Make sure you use the OR connector for all 3 detection methods.

  • User Experience
    • Install for System
    • Whether or not a user is logged in
    • Hidden

  • Requirements = none
  • Dependencies = none
  • Done!
**For uninstallation program we could generate another setup.iss file by running the installer with the "-r" switch but I was having inconsistent results so instead I just grabbed the "UninstallString" key from the registry.

***Just to be thorough I use both standard and Wow6432Node paths in the registry detection methods; probably not necessary.

If you already have a previous version of Pulsonix (we have 9.0 already) then you can specify a supercendence relationship. Be careful of course, depending on your version of SCCM, if you create a supercedence relationship and have a required deployment you may force an upgrade for those users. Since we've a small user base for this app I've only deployed them as available so no update will be forced.
  • Open the Pulsonix app you created
  • Go to Supersedence tab

  • Select Add
  • Select Browse
  • Find your previous Pulsonix app
  • Select the replacement Deployment Type
  • Select Uninstall

  • Repeat for any additional Pulsonix apps/updates


Deploy the app to your test group and you should be all set with the base installer!
Part 2 coming soon on packaging the updates.