Here are scripts for silent installation depending on your operating system and installer type:
Windows Batch Script (.bat)
batch
@echo off
setlocal
:: Set the folder path where your installer is located
set "INSTALLER_PATH=C:\Path\To\Your\Folder"
:: Set the installer filename
set "INSTALLER_NAME=YourApp.msi"
:: For MSI installers
msiexec /i "%INSTALLER_PATH%\%INSTALLER_NAME%" /quiet /norestart
:: For EXE installers (common silent switches)
:: "%INSTALLER_PATH%\YourApp.exe" /S
:: "%INSTALLER_PATH%\YourApp.exe" /silent
:: "%INSTALLER_PATH%\YourApp.exe" /quiet
:: "%INSTALLER_PATH%\YourApp.exe" /VERYSILENT
echo Installation completed
pause
Windows PowerShell Script (.ps1)
powershell
# Define installer location
$installerPath = "C:\Path\To\Your\Folder"
$installerName = "YourApp.msi"
$fullPath = Join-Path $installerPath $installerName
# Check if installer exists
if (Test-Path $fullPath) {
Write-Host "Starting silent installation..."
# For MSI files
Start-Process msiexec.exe -ArgumentList "/i `"$fullPath`" /quiet /norestart" -Wait
# For EXE files (uncomment and modify as needed)
# Start-Process $fullPath -ArgumentList "/S" -Wait
Write-Host "Installation completed"
} else {
Write-Host "Installer not found at: $fullPath" -ForegroundColor Red
}
Linux Bash Script
bash
#!/bin/bash
# Define installer location
INSTALLER_PATH="/path/to/your/folder"
INSTALLER_NAME="your-app.deb" # or .rpm, .sh, etc.
# Navigate to installer directory
cd "$INSTALLER_PATH" || exit 1
# For different package types:
# Debian/Ubuntu (.deb)
sudo dpkg -i "$INSTALLER_NAME" 2>/dev/null
# Red Hat/Fedora (.rpm)
# sudo rpm -i "$INSTALLER_NAME" --quiet
# Generic installer script
# sudo ./"$INSTALLER_NAME" --silent --no-interactive
# AppImage
# chmod +x "$INSTALLER_NAME"
# ./"$INSTALLER_NAME" --appimage-extract
echo "Installation completed"