Deploying SAS with Intune

Tags sas

Zehadi Alam

The following procedure outlines the steps for deploying SAS using Microsoft Intune.

1. Create a response file for SAS. This file contains the choices that are selected during the installation wizard. Run the SAS deployment wizard in record mode to create the response file.

setup.exe -record -responsefile C:\path\to\responsefile\sdwresponse.properties

Make your selections throughout the wizard.

2. After finishing the wizard, right-click and edit the sdwresponse.properties file with notepad and change the location of the SAS license file as follows (replace the license file name with your own).

SAS_INSTALLATION_DATA=C:\Windows\Temp\SAS94_9CWMLP_70080521_Win_X64_Wrkstn.txt

Note: The specific location does not matter. It just needs to be somewhere such that the absolute path can be known.

3. Save the following PowerShell script as Install-SAS.ps1 (replace the license file name with your own).

Copy-Item -Path "sdwresponse.properties" -Destination "C:\Windows\Temp\sdwresponse.properties"
Copy-Item -Path "SAS94_9CWMLP_70080521_Win_X64_Wrkstn.txt" -Destination "C:\Windows\Temp\SAS94_9CWMLP_70080521_Win_X64_Wrkstn.txt"
Start-Process -FilePath setup.exe -ArgumentList '-quiet -responsefile "C:\Windows\Temp\sdwresponse.properties"' -Wait -NoNewWindow

Note: The reason for copying the sdwresponse.properties file and license file to a known location is because the -responsefile parameter in setup.exe only accepts absolute paths. The absolute path to where Intune downloads the app package cannot easily be known in advance.

4. Save the response file, license file, and the Install-SAS.ps1 script in the same location as the setup.exe file.

5. Package the installation files with the Microsoft Win32 Content Prep Tool for uploading to Intune. See the Windows Software Deployment with Intune article for more information. The following is the command-line to use for the Win32 Content Prep Tool.

IntuneWinAppUtil.exe -c C:\path\to\SAS\folder -s C:\path\to\SAS\folder\Install-SAS.ps1 -o C:\path\to\output\folder -q

6. In the Intune app deployment wizard, use the following for the install and uninstall commands

Install command

powershell.exe -ExecutionPolicy Bypass -File Install-SAS.ps1

Uninstall Command

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

7. Use the following detection rule

8. Assign the application to the appropriate device groups. Review and create the app.