Tuesday, March 3, 2015

Microsoft SCCM 2012: How to create a SAS 9.4 Package

How to install SAS 9.4 silently using Microsoft SCCM 2012

Please reference the SAS Deployment Wizard and SAS Deployment Manager 9.4 Users's Guide for tips on deploying SAS.  The sections relevant to sccm deployment are the Quiet Installation as well as the Record and Playback section.

The following assumes you already have a copy of the SAS 9.4 Software Depot.

Creating the SAS response file
Perform the following to create a record file on a test system without SAS installed.
  1. Copy the SAS 9.4 Software Depot to c:\ on the test workstation.
  2. Open a command prompt and type the following command to start creating a response file
    1. "c:\SAS Software Depot\setup.exe" -record -responsefile "c:\SAS Software Depot\sdwresponse.properties"
  3. Following are the SAS installation options I selected, but this will vary depending on your environment
    1. Select Deployment Task
      1. Select Install SAS Software, Next.
    2. Specify SAS Home
      1. Keep Default (C:\Program Files\SASHome), Next.
    3. Select Deployment Type
      1. Select Install SAS Foundation and Related Software, Next.
    4. Select Products to Install (* Default Selection)
      1. SAS Deployment Tester – Client*
      2. SAS Enterprise Guide*
      3. SAS Enterprise Miner Workstation Configuration*
      4. SAS Foundation*
      5. SAS Integration Technologies Client*
      6. SAS Providers for OLE DB*
      7. SAS/GRAPH ActiveX Control*
      8. SAS/IML Studio*
      9. SAS PC Files Server
      10. Select Next.
    5. Select SAS Enterprise Guide Mode
      1. Select 64-bit Native, Next.
    6. Select SAS Foundation Products
      1. Check all products (checked by default), Next.
    7. Specify SAS Installation Data File
      1. Select your sid file.  This should be found under the sid_files directory in your Software Depot.  If there is one in the sid_files directory the SAS deployment wizard should see it there by default.  Next.
    8. Select Language Support
      1. Select clear All (only English is selected), Next.
    9. Select Regional Settings
      1. Select English (United States) en_US, Next.
    10. Default Product for SAS File Types
      1. Select Use existing default product for SAS file types, Next.
    11. Select SAS PC Files Server System Service Option
      1. Check Start Service Now and Automatically when Windows Starts, Next.
    12. Specify SAS PC Files Server Port
      1. Port Number 9621, Next. (This can be changed if you have security concerns)
    13. Deployment Summary, Next.
    14. Select Support Option
      1. Select Do Not Send, Next.
    15. Additional Resources, Finish.
  4. Copy the sdwresponse.properties file in the root of your Software Depot to the root of the Software Depot that will be the source for your package.
Creating the SCCM 2012 Silent Install Package
Note that due to the large deployment size of SAS it is not being installed from cache and instead run directly from the distribution point.
  1. Go to Software Library, Packages, and select Create Package
  2. Package
    1. Name = SAS 9.4 64Bit
    2. Description = EXPIRE=28FEB2015 (put whatever you want here, i put expiration for reference)
    3. Manufacturer = SAS
    4. Language = English
    5. Version = 9.4
    6. Check this package contains source file.  Then select the path to your SAS Software Depot.
    7. Next.
  3. Program Type
    1. Select Standard Program, Next.
  4. Standard Program
    1. Name = SAS 9.4 64Bit
    2. Command line = setup.exe -quiet -responsefile "\\sccmdp.fqdn\SMSPKGG$\packageID\sdwresponse.properties"
      1. Note that you need a full path to the response file which is why i place the full path to the file on the distribution piont.  Another method would be to precopy the response file to a known location on the endpoint and then reference that locations.  The important thing is that the full path to the file is needed
    3. Startup folder = (blank)
    4. Run = Normal
    5. Program can run = Whether or not a user is logged on
    6. Drive mode = Runs with UNC name
    7. Next
  5. Requirements
    1. Platform Requirements.  Select this program can run only on specified platforms
      1. All Windows 8 (64-bit)
      2. All Windows 8.1 (64-bit)
      3. All Windows Server 2012 R2 (64-bit)
      4. All Windows Server 2012 (64-bit)
      5. Windows 7 SP1 (64-bit)
      6. Windows Server 2008 R2 SP1 (64-bit)
      7. Windows Server 2008 SP2 (64-bit)
    2. Estimated disk space = Unknown
    3. Maximum allowed run time = Unknown
    4. Next.
  6. Summary, Next.
  7. Close
Now you need to Distribute the SAS 9.4 64Bit package to your distribution points and then Deploy the package to collections.

Creating an Uninstall Package
If you have the need to silently uninstall SAS 9.4 you can create a program with the following command line to silently uninstall SAS 9.4

"C:\Program Files\SASHome\SASDeploymentManager\9.4\sasdm.exe" -quiet -uninstallall

Updating SAS with a new license file
The following command can be used to update your SAS instance:

  1. 32Bit Version Renewals
    1. "C:\Program Files\SASHome\x86\SASRenewalUtility\9.4\sasrenew.exe" -s "datafile:%cd%\SAS94_9B7QDC_70007566_Win_Wrkstn.txt"
  2. 64Bit Version Renewals
    1. "C:\Program Files\SASHome\SASRenewalUtility\9.4\sasrenew.exe" -s "datafile:%cd%\SAS94_9B7QDC_70083910_Win_X64_Wrkstn.txt"

One thing to note is that the above command doesn't seem to play well when called directly from the program command line.  For this reason, i actually put this command into a .cmd or .bat file and then setup my program to call the .cmd or .bat file.

Also, if you have an environment where users may not have a consistent SASHome directory (Ex: SASHome2), you may want to copy the contents of the SASRenewalUtility directory to a source location and run the sasrenew.exe from their.

Other comments and considerations
In some scenarios you may not want to do a silent install and instead all the user to select the options they want to install.  If this is the case there are some issues I ran into in my deployment testing

  1. If the program calls setup.exe and the environment is set to Administrative Rights with the option Allow users to interact with this program some functions may not work correctly.  Specifically if users do a full installation it will prompt at some point for the location of the browser and will not allow the user to select or manually enter the location.
  2. To work around the issue noted above the program needed to be set to run with user rights.  This means the user will need to be a member of the administrators group on the system.  The user will also need read/execute rights to the content location on your distribution point.