Hello Alex Dresser,
Can you try below steps to see if it works for you?
Step 1: Prepare the Assets
- Download the SSMS installer (e.g., SSMS-Setup-ENU.exe).
- Create a simple PowerShell script (install_ssms.ps1) that will execute the installer silently.
Step 2: Create the PowerShell Script The script's job is to execute the installer.
Save this as install_ssms.ps1.
Start-Process -FilePath ".\SSMS-Setup-ENU.exe" -ArgumentList "/install", "/quiet", "/norestart" -Wait -PassThru
exit $LASTEXITCODE
Step 3: Create the Package
- Open the MSIX Packaging Tool.
- Choose "Create a new package".
- On the Package information page, fill in your details (Name, Publisher, Version).
- On the Prepare computer page, it's best to use a clean VM. Take a snapshot if you can.
- On the Installation page, you will not install SSMS. Instead, you will simply copy the files. · Click "Browse" and select your SSMS-Setup-ENU.exe and install_ssms.ps1 files. The tool will copy them into the package.
- Proceed through the remaining screens without making changes related to the installation. The tool will finish and create an MSIX package containing just your two files.
Step 4: Edit the Package Manifest to Run the Script because you need to tell the package to run your PowerShell script upon installation.
- Unpack the MSIX package using the MSIX Packaging Tool's "Package editor" or a tool like makeappx.exe.
- Open the AppxManifest.xml file.
- Find the <Applications> section. You will define an application that runs your script.
- Modify it to look something like this:
<Applications> <Application Id="InstallSSMS" Executable="powershell.exe" EntryPoint="Windows.FullTrustApplication"> <uap:VisualElements DisplayName="Install SQL Server Management Studio" Description="Runs the SSMS installer locally" BackgroundColor="transparent" /> <uap:Extension Category="windows.customInstall"> <uap:CustomInstall Folder="Contents"> <uap:OnInstall Command="powershell.exe -ExecutionPolicy Bypass -File `"install_ssms.ps1`""/> </uap:CustomInstall> </uap:Extension> </Application> </Applications>
- Repack the MSIX file.
Step 5: Deploy via App Attach
- Stage this new MSIX package in your Azure Storage Account.
- Register it to your host pool as you normally would with App Attach.
- When a user logs in, the package will be attached.