We are still running SPSS version 21 and I found the showlic.exe command in its program folder. Running this command shows the status of the machine's license.
C:\Program Files\IBM\SPSS\Statistics\21>showlic.exe
License information for IBM SPSS Statistics 21 installed in C:\Program Files\IBM
\SPSS\Statistics\21\
Feature 1200 - IBM SPSS Statistics:
Local license for version 21.0
Tethered to: Disk ID
Expires on: 01-Mar-2016
Feature 1203 - IBM SPSS Advanced Statistics:
Local license for version 21.0
Tethered to: Disk ID
Expires on: 01-Mar-2016
Feature 1221 - IBM SPSS Statistics Base:
Local license for version 21.0
Tethered to: Disk ID
Expires on: 01-Mar-2016
Press ENTER to continue...
The command expects you to press ENTER so in order to automate it you can pipe a carriage return:
echo.|showlic.exe
Using this command I created a custom inventory rule that pulls the license data into the inventory:
ShellCommandTextReturn(cmd /c "cd "\Program Files\IBM\SPSS\Statistics\21" & echo.|showlic.exe")
A separate rule was created for 64bit machines due to the difference in program files path:
ShellCommandTextReturn(cmd /c "cd "\Program Files (x86)\IBM\SPSS\Statistics\21" & echo.|showlic.exe")
Once these rules are in place KACE will start collecting the license status of machines with SPSS installed. I was afraid that it would include an error message for all machines when it couldn't find the SPSS directory but that turned out to not be the case. Now that this data is in the inventory I was able to create a report to find machines with a local license installed. This first report shows the license status for all machines:
SELECT DISTINCT(MACHINE.NAME), MACHINE.OS_NAME,
CASE
WHEN OS_ARCH = "x86" THEN L32.STR_FIELD_VALUE
WHEN OS_ARCH = "x64" THEN L64.STR_FIELD_VALUE
END AS SPSSLicenseStatus
FROM MACHINE
LEFT JOIN MACHINE_CUSTOM_INVENTORY L32 on MACHINE.ID = L32.ID and L32.SOFTWARE_ID = 69610
LEFT JOIN MACHINE_CUSTOM_INVENTORY L64 on MACHINE.ID = L64.ID and L64.SOFTWARE_ID = 69787
HAVING SPSSLicenseStatus is not null
ORDER BY MACHINE.NAME
I used a CASE statement to determine which custom inventory rule actually contains the information I'm looking to find. If you are going to recreate this report in your environment then make sure you change the values of L32.SOFTWARE_ID and L64.SOFTWARE_ID to match the ID of the custom inventory rules you created in the software inventory.
This report will show just those machines with a local license installed:
SELECT DISTINCT(MACHINE.NAME), MACHINE.OS_NAME,
CASE
WHEN OS_ARCH = "x86" THEN L32.STR_FIELD_VALUE
WHEN OS_ARCH = "x64" THEN L64.STR_FIELD_VALUE
END AS SPSSLicenseStatus
FROM MACHINE
LEFT JOIN MACHINE_CUSTOM_INVENTORY L32 on MACHINE.ID = L32.ID and L32.SOFTWARE_ID = 69610
LEFT JOIN MACHINE_CUSTOM_INVENTORY L64 on MACHINE.ID = L64.ID and L64.SOFTWARE_ID = 69787
HAVING SPSSLicenseStatus like "%Local license%"
ORDER BY MACHINE.NAME
Comments