Wednesday, October 28, 2015

Silently Deploy IBM SPSS 23



Deploying SPSS 23 is much like deploying SPSS 22. There is one notable difference I have found in regards to deploying using the AUTHCODE parameter. There appears to be a bug in the MSI that when the AUTHCODE parameter is used, the spssprod.inf configuration file in the SPSS 23 directory is created with a blank value for DaemonHost, where it should have the value no-net (if using a site license parameter this value will have the name of your license server). I found information about this bug at the IBM support site (you might have to have an IBM account and access to the site to view the whole bug report) https://www-304.ibm.com/support/entdocview.wss?uid=swg1PI37055 . You will notice this bug happening because all the modules for SPSS will not load during installation because your license is not functioning correctly.


Taking the information about this bug, I created a PowerShell script that would edit the spssprod.inf file at the end of the installation and put in DaemonHost=no-net. The script checks for the existences of  the exact string "DaemonHost= ". Notice the space after the = sign. If that string exists exactly, it will replace it with DaemonHost=No-Net. That way if the MSI is ever fixed, or happens to function correctly my install script does not ruin the install by trying to correct an already correct config file.


Here is the script I use for laptops (with AUTHCODE parameter)
# Uninstall all old SPSS's and PASW's that are installed!
$Installs = get-wmiobject -namespace root\cimv2\sms -query "select * from SMS_InstalledSoftware where ProductName like '%Statistics%'"
foreach ($Install in $Installs)
{
 if (($Install.Productname -match "(IBM SPSS)") -or ($Install.Productname -match "PASW"))
 {
  $Install.productname
  $software = $Install.softwarecode
  $UninstallArgs = "/x $software /qn /norestart ALLUSERS=1 REMOVE=`"ALL`""
  start-process msiexec.exe -ArgumentList $UninstallArgs -wait
 }
}

# Begin Installation SPSS22 with Offline License, update for new versions
$SPSSArgs = '"IBM SPSS Statistics 23.msi" AUTHCODE="yourlicensecodehere" INSTALLPYTHON="1" ENABLE_JAB="1"'
$MSIexecArgs = "/qn ALLUSERS=2 /m MSIUQUPQ /norestart /i"
Start-Process msiexec.exe -ArgumentList "$MSIexecArgs $SPSSArgs" -Wait

# Enable UUENCODING for all users, update for new versions
reg add HKLM\Software\JavaSoft\Prefs\com\ibm\/S/P/S/S\/Statistics\23.0\ui\dialog_settings\welcome_page /v show_unicode_warning /d 1 /f
reg add HKLM\Software\JavaSoft\Prefs\com\ibm\/S/P/S/S\/Statistics\23.0\ui\dialog_settings\welcome_page /v shown_unicode_warning /d 1 /f

<# 
Edit spssprod.inf file to fix issue with IBM's version 23 installer when using AUTHCODE
Line should read "DaemonHost=no-net" instead of being blank. This will add no-net if it is blank.
Check if still needed in newer versions. 
#>
$spssprod = get-content $ENV:ProgramFiles\IBM\SPSS\Statistics\23\spssprod.inf
if ($spssprod -match "^DaemonHost=\s$")
    {
    $spssprod.replace('DaemonHost=','DaemonHost=no-net') | set-content $ENV:ProgramFiles\IBM\SPSS\Statistics\23\spssprod.inf
    } 

For completeness here is the script I am using for Desktop installs using a license server:
# Uninstall all old SPSS's and PASW's that are installed!
$Installs = get-wmiobject -namespace root\cimv2\sms -query "select * from SMS_InstalledSoftware where ProductName like '%Statistics%'"
foreach ($Install in $Installs)
{
 if (($Install.Productname -match "(IBM SPSS)") -or ($Install.Productname -match "PASW"))
 {
  $Install.productname
  $software = $Install.softwarecode
  $UninstallArgs = "/x $software /qn /norestart ALLUSERS=1 REMOVE=`"ALL`""
  start-process msiexec.exe -ArgumentList $UninstallArgs -wait
 }
}

# Begin Installation SPSS22 with Network License, update for new versions
$SPSSArgs = '"IBM SPSS Statistics 23.msi" LICENSETYPE="Network" LSHOST="yourlicenseserverhere" DISABLE_COMMUTE="1" INSTALLPYTHON="1" ENABLE_JAB="1"'
$MSIexecArgs = "/qn ALLUSERS=2 /m MSIDWWPE /norestart /i"
Start-Process msiexec.exe -ArgumentList "$MSIexecArgs $SPSSArgs" -Wait

# Enable UUENCODING for all users, update for new versions
reg add HKLM\Software\JavaSoft\Prefs\com\ibm\/S/P/S/S\/Statistics\23.0\ui\dialog_settings\welcome_page /v show_unicode_warning /d 1 /f
reg add HKLM\Software\JavaSoft\Prefs\com\ibm\/S/P/S/S\/Statistics\23.0\ui\dialog_settings\welcome_page /v shown_unicode_warning /d 1 /f



As usual with my posts, these scripts are designed to deploy using SCCM.

10 comments:

  1. This works a treat adding LSHOST="no-net" on the command line:
    E.G. msiexec /i "IBM_SPSS_Statistics_23.msi" /L*v %temp%\SPSS23_Inst.log AUTHCODE="#####" LSHOST="no-net" /qn /norestart

    ReplyDelete
    Replies
    1. Hello Marc,
      Thank you for sharing. I overlooked the LSHOST parameter option when I was thinking though this issue and jumped right to solving the issue with what I have been learning lately, PowerShell. In hindsight it makes sense that LSHOST parameter dictates what appears on the DAEMONHOST line, it is the same line that holds the license server name. Your solution is simpler and I have now implemented it instead.

      Delete
    2. Hi msiexec /i "IBM_SPSS_Statistics_23.msi" /L*v %temp%\SPSS23_Inst.log AUTHCODE="#####" LSHOST="no-net" /qn /norestart command can this be added on to sccm 2012 or is it a powershell only command

      Thank you

      Delete
  2. Hi David,

    I am getting interactive services detection popup when i Silently Deploy IBM SPSS 23 through SCCM . Do you have any idea what trigging the popup.

    Below is the command line i use to install spss 23 using powershell

    msiexec /i IBM_SPSS_Statistics_23.msi LSHOST=xxxxxx LICENCETYPE=Network INSTALLPYTHON="1" ENABLE_JAB="1" /qn /norestart | Out-Null

    Event ID : -1000
    A device or program has requested attention. Device or application: C:\Program Files\IBM\SPSS\Statistics\23\vcredist_x64.exe. Message title: Extracting Files.

    A device or program has requested attention. Device or application: C:\WINDOWS\system32\cmd.exe. Message title: C:\WINDOWS\system32\cmd.exe.

    Thanks

    ReplyDelete
    Replies
    1. Hello bibin
      I am not able to reproduce your error, I cant get that command line to install at all. But my understanding of the vcredist_x64.exe file is that it has some Microsoft Visual C++ redistributable libraries in it that SPSS needs. I cannot find an article that lists Microsoft Visual C++ as a requirement for SPSS, but I believe it might be so. Does the computer you are trying to install it on have one of the Visual Redistributables?
      In my install script I set 2 variables with parameters (I had no luck using a 1 liner and I was wasting too much time getting the syntax right), and then use start-process so i can use the -wait parameter so the install can finish before SCCM tries to detect it. I put all this in a script.

      $SPSSArgs = '"IBM SPSS Statistics 23.msi" LICENSETYPE="Network" LSHOST="servername" DISABLE_COMMUTE="1" INSTALLPYTHON="1" ENABLE_JAB="1"'

      $MSIexecArgs = "/qn ALLUSERS=2 /m MSIDWWPE /norestart /i"

      Start-Process msiexec.exe -ArgumentList "$MSIexecArgs $SPSSArgs" -Wait

      Then the command to install as an application in SCCM is:
      powershell.exe -ExecutionPolicy Unrestricted -File filename.ps1

      Hope that helps!

      Delete
    2. Thank David , I have VC++ different versions installed already in this machine . lets see if i run the VC++ installer again before SPSS goes in ...Thanks for your reply..

      Delete
  3. The full version of SPSS is available online at https://www.apponfly.com/en/ibm-spss-statistics-base?KAI 30-day free trial is available as well

    ReplyDelete
  4. Jamie,
    The command you list or something like it can be used in the "Installation program:" field of the SCCM application. It is not a Powershell command itself. I use the script instead of just running the install command because the script removes the old SPSS versions and removes some first run prompts. (The UUENCODING reg settings)

    ReplyDelete
  5. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in IBM SPSS, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on IBM SPSS. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Nitesh Kumar
    MaxMunus
    E-mail: nitesh@maxmunus.com
    Skype id: nitesh_maxmunus
    Ph:(+91) 8553912023
    http://www.maxmunus.com/

    ReplyDelete
  6. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in sccm , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on TECHNOLOGY. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us.
    Sangita Mohanty
    MaxMunus
    E-mail: sangita@maxmunus.com
    Skype id: training_maxmunus
    Ph:(0) 9738075708 / 080 - 41103383
    http://www.maxmunus.com/

    ReplyDelete