Overview
Swif lets you deploy your own software to Windows, macOS, and Linux devices, by uploading an installer or adding scripts in the Swif console. This article covers supported formats, silent installs, validation rules, and script examples.
Looking for ready-made apps?
This article covers custom software: your own installers, scripts, or packages. For one-click installs of popular apps, use the Application Templates on the Applications page (View All Templates). To add App Store and Google Play apps, use Add Application > Import Apple VPP apps, Import Apple Store Apps, or Import Android Play Apps. To have Swif install and update apps through each platform's package manager (Chocolatey on Windows; APT, DNF, Pacman, and others on Linux), see Installing and Managing Software on Windows and Linux with Swif.
Deploy custom software
In Swif, go to Device Management > Applications, click Add Application, and select Custom Application pkg.
Choose the Operating System, and fill in the app's details.
Upload your installer, such as an
.msi,.exe,.pkg, or.debfile. For macOS command-line tools from Homebrew, set Type to Script instead. See Deploying Homebrew command-line tools below.Set the Validation Rules Swif uses to check that the app is installed.
Assign the app to devices or device groups, review your settings, and click Finish.
Swif delivers the app to the assigned devices.
Supported package formats
Platform | Formats |
Windows |
|
macOS |
|
Linux | Package formats: DEB, RPM, ARCH, ZIP, and TAR |
Linux package managers
Item | Supported |
Package manager types | ALL, APT, DNF, FLATPAK, PACMAN, SNAP, YUM, ZYPPER, and NIX |
External repositories | APT, PACMAN, DNF, FLATPAK, YUM, ZYPPER, and NIX |
Distribution | Package managers |
Debian | APT, SNAP, FLATPAK |
Arch | PACMAN, FLATPAK |
SUSE | ZYPPER, DNF, YUM |
Fedora | DNF, RPM, FLATPAK |
RHEL | YUM, DNF, RPM |
NixOS | NIX |
Installed App Name
When adding a custom app, Installed App Name tells Swif how to detect whether the app is installed on a device. It must match how the operating system names the app after it's installed.
macOS
Installation options
Install on logged-in user accounts only
When this is on, the app installs only on Macs where a user is signed in. Use it for installs that need user-specific settings or input.
ZIP and APP files
You can upload .zip and .app files directly. They need a pre-install script, which can use the {{URL}} placeholder. Swif replaces it with the uploaded file's download link.
Deploying Homebrew command-line tools
To deploy command-line tools from Homebrew, such as wget, jq, or git, create a custom app with the Script type. You don't need an installer. Instead, you add three scripts: one to install the tool, one to check whether it's installed, and one to remove it.
Click Add Application, select Custom Application pkg, and set Operating System to macOS, and Type to Script. The Installer File and Installed App Name fields are hidden.
Add the install, install check, and uninstall scripts. Next to Pre-Install Command Script, View sample Brew scripts links to ready-to-use templates.
| Details |
Supported | Homebrew formulae, such as command-line tools and libraries |
Not supported | Homebrew casks, such as apps with a graphical interface. Use a |
Apple silicon Macs | Homebrew is installed automatically, if it's missing |
Intel Macs | Homebrew must already be installed |
For the scripts and full steps, see Deploying Command-Line Tools & Homebrew Packages on macOS.
Running commands as root
All scripts in a macOS custom app run as root. See How to run Commands as sudo on macOS with Swif.
Validation rules
Swif checks whether a custom app is installed on a Mac with one of these rules:
Rule | What Swif checks |
Application | The app's Path and Identifier |
Bundle | That the app bundle exists |
File | That a specific file exists |
Script | The result of your own install check script |
Find an app's identifier. On a Mac where the app is installed, run:
mdls /Applications/ClashX.app | grep "kMDItemCFBundleIdentifier"
Install check script
Runs before the pre-install script, to decide whether the app needs to be installed:
Exit 0: the app isn't installed. Swif installs it.
Exit 1: the app is already installed. Swif skips it.
#!/bin/sh
# Install if MyApp is missing
if [ -d "/Applications/MyApp.app" ]; then
exit 1
else
exit 0
fi
Uninstall script
Removes the app.
#!/bin/sh
# Remove MyApp
/bin/rm -rf "/Applications/MyApp.app"
exit 0
Uninstall check script
Decides whether the app should be removed:
Exit 0: the app is installed. Swif removes it.
Any other code: the app isn't installed. Swif skips removal.
#!/bin/sh
if [ -e "/Applications/OneDrive.app" ]; then
exit 0
else
exit 1
fi
Install location and password prompts
Swif installs macOS apps in /Applications.
First install: usually runs silently.
Updates: macOS may ask the signed-in user for an administrator password once, to approve changes in
/Applications. After that, the update continues normally.
If a user sees several password prompts during one update, contact Swif support, and include the log at /Library/Managed Installs/Logs/ManagedSoftwareUpdate.log.
Windows
Silent installation
Silent installs run without user interaction. The arguments depend on the installer type:
Installer | Silent arguments |
MSI | Usually |
EXE | Vary by installer. Check the vendor's documentation. Common ones are |
Chocolatey | Silent by default |
Winget | Silent by default |
Type each argument in the Arguments field, and press Enter.
Key=value arguments: enter them without quotes, for example ACCT_KEY=xxx, not ACCT_KEY="xxx". Swif escapes quotes when it passes arguments, which would break the command.
If an installer has no silent arguments, it opens on the device, and the user must complete it.
Running commands as administrator
All scripts in a Windows custom app run with administrator rights. Some apps need to install as SYSTEM, and others as the user. Swif tries both. See How to run Commands as Administrator on Windows Devices with Swif.
Validation rules
Rule | What Swif checks |
File | That a file exists, such as |
Registry | The app's name and version in the registry. Find them under |
Script | The result of your own install check script |
Install check script
Runs before the pre-install script:
Exit 0: the app isn't installed. Swif installs it.
Exit 1: the app is already installed. Swif skips it.
if (Test-Path "C:\Program Files\MyApp\app.exe") {
exit 1
} else {
exit 0
}Installation context
Package type or method | Installs as |
Chocolatey ( | Local System |
Windows Installer ( | Local System |
Executable installer ( | Local System |
PowerShell script ( | Local System |
Windows Package Manager ( | Local User |
MSIX package ( | Local User |
This affects where the app is installed, which user profile gets it, and whether the installer can reach user-specific settings. Make sure your install check scripts look in the right system-level or user-level location.
Linux
External repositories
When installing with a package manager, you can add an external repository in Swif:
Field | What to enter |
Repository URL | The address of the repository |
Distribution (DEB only) | The release channel, such as |
Components (DEB only) | The repository components, such as |
Arch | Optional. The architecture, such as |
Repo ID (ARCH only) | The repository's identifier |
Key Source | Where to get the repository's GPG key |
Received Keys | Optional. GPG keys used to verify packages |
Installing files from a .tar archive
To put files in specific system folders, such as /etc/cups/ppd/ for printer drivers, a .tar archive with the folder structure isn't enough. Use one of these methods.
Method 1: Include a Makefile
When Swif installs a .tar archive, it unpacks it in a temporary folder, and runs make install. Swif installs make first, if it's missing. Without a Makefile, the files are only unpacked, and never reach their destination.
Example: install a printer driver file to /etc/cups/ppd/
Set up the folder:
Epson-AM-C4000_Series_PS/
├── Makefile
└── Epson-AM-C4000_Series_PS.ppdAdd an
installtarget to the Makefile:install:
# Create the target folder if it doesn't exist
mkdir -p /etc/cups/ppd/
# Copy the PPD file into it
cp Epson-AM-C4000_Series_PS.ppd /etc/cups/ppd/Makefile commands must start with a tab, not spaces.
Create the archive:
cd Epson-AM-C4000_Series_PS
tar -cvf Epson-AM-C4000_Series_PS.tar .Upload
Epson-AM-C4000_Series_PS.tarto Swif. The PPD file is copied to/etc/cups/ppd/on each device.
Method 2: Download and install with a pre-install script
For full control, download the archive yourself in a pre-install script, using the {{URL}} placeholder. Swif replaces it with a signed download link to your .tar file. See Using Placeholders in Script Editors for Custom Software Uploader.
#!/bin/bash
# 1. Download the archive
curl -L -o /tmp/mysoftware.tar "{{URL}}"
# 2. Extract it
tar -xvf /tmp/mysoftware.tar -C /tmp
# 3. Add any other steps, such as running make install
Running commands as root
All scripts in a Linux custom app run as root. See How to Run Commands as sudo on Linux with Swif.
Validation rules
On Linux, one app can include several packages, one for each distribution, so you only need one app for all your distributions. Each package has its own validation rules:
Rule | What Swif checks |
Path | That a file exists at the exact location you give |
Hash | That the file at the path matches the hash you give, so the right version is installed |
Install check script
Runs before the pre-install script:
Exit 0: the app isn't installed. Swif installs it.
Exit 1: the app is already installed. Swif skips it.
#!/bin/sh
# Install if the myapp command isn't found
if command -v myapp >/dev/null 2>&1; then
exit 1
else
exit 0
fi
Uninstall script
Removes the app.
#!/bin/sh
# Remove MyApp
rm -rf /opt/myapp
rm -f /usr/local/bin/myapp
exit 0
Checking whether a Linux app is installed
If an app has no desktop entry, or was installed another way, Swif checks for it in other places. If an app seems to be installed, but Swif doesn't detect it, check these on the device:
# 1. Check whether a service exists
sudo systemctl status {appName}
# 2. Check for desktop entries
ls /usr/share/applications | grep {appName}
ls /usr/local/share/applications | grep {appName}
ls ~/.local/share/applications | grep {appName}
# 3. Check for the program itself
ls /usr/bin | grep {appName}
ls /usr/local/bin | grep {appName}
Scripting
Pre-install and post-install scripts
Script | When it runs |
Pre-Install Command Script | Before the app is installed |
Post-Install Command Script | After the app is installed |
For example, a Windows pre-install script that closes the app before it's updated:
# Close MyApp, if it's running, before installing
Stop-Process -Name "MyApp" -Force -ErrorAction SilentlyContinue
exit 0
Exit codes
Script | Exit code | What happens |
Any command | 0 | Success, or the condition checked is true |
| Non-zero | Failure, or the condition checked is false |
Pre-install script | 0 | The install continues |
| Non-zero | The install is cancelled for this app |
Post-install script | 0 | The script succeeded |
| Non-zero | The script failed, and the error is logged |
Install check script | 0 | The app needs to be installed. Swif installs it. |
| Non-zero | The app is installed. Swif skips it. |
Uninstall check script | 0 | The app is installed. Swif removes it. |
| Non-zero | The app isn't installed. Swif skips removal. |
Using the installer URL in scripts
After you upload an installer, Swif gives it a download link, which you can use in scripts with the {{URL}} placeholder. See Using Placeholders in Script Editors for Custom Software Uploader.
#!/bin/sh
curl -L "{{URL}}" -o /tmp/installer.zip
unzip /tmp/installer.zip -d /Applications
Check where an app is installed
Go to Applications in the sidebar.
Search for, or select, the app.
Click the number in the Installed On column.
The details panel shows:
List | Devices shown |
Installed On | Devices assigned the app, where it's part of their software list |
Blockedlist On | Devices where the app is blocked |
The Applications list counts devices where the app is actually installed. The details panel shows devices assigned the app. This helps you tell apart devices the app is assigned to, and devices where it's installed.
Update or remove software
Update: upload the new installer version to Swif.
Remove: use an uninstall script, or remove the app from devices in the Swif console.
Troubleshooting
Check the device logs
Platform | Log |
Windows |
|
macOS |
|
Linux |
|
An installer opens on the device, and waits for the user
The installer has no silent arguments, or they're wrong. See Silent installation under Windows.
A Linux app installed, but Swif doesn't detect it
See Checking whether a Linux app is installed.
FAQ
Can I host installers somewhere else?
No. Upload installer files to Swif. For Homebrew command-line tools on macOS, no installer is needed. See Deploying Command-Line Tools & Homebrew Packages on macOS.
What happens with installers that can't run silently?
They open on the device, and the user must complete them.
Do I need separate 32-bit and 64-bit installers?
Yes. Upload separate installers, and set the architecture for each.
How long does an install take?
It depends on the installer's size. Devices check for new software every 15 minutes, so an install usually starts within 1 to 15 minutes.
Tips
Test silent arguments before deploying to all devices.
Use validation rules or install check scripts, so Swif knows accurately whether an app is installed.









