SPSS Activation Batch Script Guide by Kemp Langhorne
Script by : Kemp Langhorne
Updated January 20, 2007

Introduction:

The following is a DOS batch script that will activate SPSS for you. When you install SPSS and sysprep for an image, you lose your activation. Apparently, SPSS's activation is based on the hardware profile of the computer. When you put the image on a new computer, the hardware profile changes and SPSS must be reactivated. This batch script is an easy way to reactivate SPSS on lots of computer quickly without having to use SPSS's GUI. There are two versions of this script. Use the first complex script if you have two installs of SPSS on the same computer in different directories. Use the second simple script if you want an easy way to activate SPSS in the default install directory.

Script Information:

The complex script first checks to see where SPSS is installed. In my case, we ran dual installs of SPSS 13 and SPSS 15. We would install SPSS 15 in a different directory so both 13 and 15 could be used on the same computer. The simple script uses the spssactivator.exe file that is already inluded in the default install. It will execute that program along with your activation code to activate SPSS.

Notes:

These scripts have been used to activate SPSS 15 within Windows XP. However, there is no reason it can't work with 16 and any new versions as long as you use the proper spssactivator.exe file.

Requirements:

spssactivator.exe (http://www.spss.com/)
This program is available on the SPSS website or you can get it from the directory you install SPSS to. It is also at ftp://ftp.spss.com/pub/spss/windows.

A Network Share
The complex script requires a network share were it can copy spssactivator.exe from. Meaning, you will need to put a copy of spssactivator.exe on a server somewhere and give the correct permission to it so the script can access it. Note: Depending on if spssactivator.exe is included with your default SPSS install, you may not need this network share. However, you will have to edit the batch file to do it that way.

The Batch Script

The following are the batch scripts. The complex script is first, followed by the simple script. When you see the activation results appear in the DOS window, you know SPSS was activated successfully.

Complex SPSS Activation:

REM SPSS 15 Activation Batch Script
REM Script created by Kemp Langhorne
REM www.pcexhaust.com

REM The script starts by checking which directory SPSS is installed in, and then it will activate SPSS 15 based on the directory it found the install in.

ECHO ***SPSS 15 Activation Script...***
ECHO.
ECHO.
REM Checks to see if SPSS was installed in another directory.
if exist "C:\\Program Files\\spss15" goto spss15
goto spss
 
:spss15
ECHO ***INSTALLATION IN FOLDER SPSS15***
REM Mounts network share as X. Change this to your network share
net use x: \\\\networkshare\\folder
REM This line copies spssactivator from the network share to the installation directory
xcopy /Q /R /Y x:\\spssactivator.exe C:\\Progra~1\\spss15\\
c:
cd \\Progra~1\\spss15\\
REM This line activatates SPSS
spssactivator.exe "Activation Code minus the quotes"
ECHO.
goto exit
 
:spss
ECHO ***INSTALLATINON IN FOLDER SPSS***
REM Mounts network share as X. Change this to your network share
net use x: \\\\networkshare\\folder
REM This line copies spssactivator from the network share to the installation directory
xcopy /Q /R /Y x:\\spssactivator.exe C:\\Progra~1\\spss\\
c:
cd \\Progra~1\\spss\\
REM This line activates SPSS
spssactivator.exe "Activation Code minus the quotes"
goto exit
 
:exit
REM Deletes the mounted network share
net use x: /del /yes
ECHO DONE
pause
exit

Read the comments inside the code for more information on what part of the script does what.

 

Simple SPSS Activation:

REM Simple SPSS 15 Activation Batch Script
REM Script created by Kemp Langhorne
REM www.pcexhaust.com

ECHO ***SPSS 15 Activation Script...***
ECHO.
spssactivator.exe "Activation Code minus the quotes"
ECHO DONE
pause
exit

Read the comments inside the code for more information on what part of the script does what.