Audacity
Contents
About
Audacity is a free and open-source digital audio editor and recording application software, available for Windows, macOS, Linux, and other Unix-like operating systems.
Version: 2.4.2
Assumptions
This document assumes you are familiar with the use of a Windows Administrator Command Prompt. It also assumes your copy of the PSADT is preconfigured to write logs to C:\ProgramData\Logs.
Obtain Package Source
Traditionally, three components were required for running Audacity for most purposes:
However, the latest Audacity installer now includes LAME, so this will not be required and the above link is for reference only. Bear in mind the uninstall section will look for LAME also, to ensure any legacy installs are removed if a previous version of LAME was installed.
Vendor Configuration for Silent Install
The vendor installer is based on the Inno Setup installer. Configuration options for installation including silent install can be found at jrsoftware.org.
Suppress Desktop Shortcut
The default silent install of Audacity creates a shortcut on the desktop, which is undesirable in many environments. To stop this happening, a config file can be created by running a manual install using switches from the above list:
audacity-win-2.4.2.exe /SAVEINF="config.inf"
config.inf
[Setup] Lang=en Dir=C:\Program Files (x86)\Audacity Group=(Default) NoIcons=0 Tasks=
Deploy Info
Audacity 2.4.2 Audacity Team C:\Program Files (x86)\Audacity\audacity.exe Hive: HKEY_LOCAL_MACHINE Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Audacity_is1 Value: DisplayVersion DataType: Version Data: 2.4.2 Operator: Greater than or equal to 32-bit: Yes SCCM Requirement: None
Deploy-Application.ps1
Please note the script contains Pre-installation logic to detect and uninstall any legacy version it encounters and logs the version number. It achieves this by searching the registry for an array containing the three associated applications as keywords, then methodically running a test for each one, ascertaining it’s Uninstall string, and calling it with the provided silent switches. If the application and version we want is already installed, the install will not proceed.
Relevant extracts from the script are as follows:
*=============================================== * VARIABLE DECLARATION *=============================================== Variables: Application [string]$appVendor = 'Audacity Team' [string]$appName = 'Audacity' [string]$appVersion = '2.4.2' [string]$appArch = 'x86' [string]$appLang = 'EN' [string]$appRevision = '01' [string]$appScriptVersion = '1.0.0' [string]$appScriptDate = '30/06/2020' [string]$appScriptAuthor = 'psadt.com' [string]$Parms = "/VERYSILENT /NORESTART" *=============================================== ##*=============================================== ##* PRE-INSTALLATION ##*=============================================== ## <Perform Pre-Installation tasks here> # Remove previous versions if exist [array]$appInstalls = "*FFmpeg*","*LAME*","*Audacity*" ForEach ($appInstall in $appInstalls) { ForEach ($regFolder in $regKeyApplications) { $appVer = Get-ChildItem -Path $regFolder | Get-ItemProperty | Where-Object {$_.DisplayName -like $appInstall } | Select-Object -Property DisplayName, DisplayVersion, UninstallString ForEach ($ver in $appVer) { If ($ver.UninstallString) { $appExist = 1 $appRemove = $ver.DisplayName $oldVersion = $ver.DisplayVersion $Uninst = $ver.UninstallString If ($oldVersion -ne $appVersion) { # Uninstall Write-Log -Message "Uninstalling $appRemove $oldVersion" -LogType 'CMTrace' Write-Log -Message "Executing $Uninst $Parms" -LogType 'CMTrace' Start-Process $Uninst -ArgumentList $Parms -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null } ElseIf ($oldVersion -eq $appVersion) { Write-Log -Message "$appRemove $appVersion is already installed." -LogType 'CMTrace' Exit-Script -ExitCode 0 } } } } If ($appExist -ne 1) {Write-Log -Message "No $appName installations detected." -LogType 'CMTrace'} ##*=============================================== ##* INSTALLATION ##*=============================================== ## <Perform Installation tasks here> Execute-Process -Path 'audacity-win-2.4.2.exe' -Parameters "/LOADINF=`"$dirFiles\config.inf`" $Parms" -WindowStyle Hidden Execute-Process -Path 'ffmpeg-win-2.2.2.exe' -Parameters $Parms -WindowStyle Hidden ##*=============================================== ##* UNINSTALLATION ##*=============================================== [string]$installPhase = 'Uninstallation' ## Handle Zero-Config MSI Uninstallations If ($useDefaultMsi) { [hashtable]$ExecuteDefaultMSISplat = @{ Action = 'Uninstall'; Path = $defaultMsiFile }; If ($defaultMstFile) { $ExecuteDefaultMSISplat.Add('Transform', $defaultMstFile) } Execute-MSI @ExecuteDefaultMSISplat } # <Perform Uninstallation tasks here> # Remove any version if exist [array]$appInstalls = "*FFmpeg*","*LAME*","*Audacity*" ForEach ($appInstall in $appInstalls) { [array]$regFolders = "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall","HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" ForEach ($regFolder in $regFolders) { $appVer = Get-ChildItem -Path $regFolder | Get-ItemProperty | Where-Object {$_.DisplayName -like $appInstall } | Select-Object -Property DisplayName, DisplayVersion, UninstallString ForEach ($ver in $appVer) { If ($ver.UninstallString) { $appExist = 1 $appRemove = $ver.DisplayName $oldVersion = $ver.DisplayVersion $Uninst = $ver.UninstallString # Uninstall Write-Log -Message "Uninstalling $appRemove $oldVersion" -LogType 'CMTrace' Write-Log -Message "Executing $Uninst $Parms" -LogType 'CMTrace' Start-Process $Uninst -ArgumentList $Parms -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null } } } If ($appExist -ne 1) { Write-Log -Message "No $appName installations detected." -LogType 'CMTrace' Exit-Script -ExitCode 1605 }
Manual installation | Audacity
audacity-win-2.3.3.exe /SAVEINF="<path>\config.inf"
Click OK
Click Next
Click Next
Click Next
Untick Create a Desktop shortcut, click Next
Click Install
Monitor install and allow it to finish
Click Next
Untick Launch Audacity, click Finish
Manual installation | FFmpeg
ffmpeg-win-2.2.2.exe
Click OK
Click Next
Click Next
Click Next
Click Install
Click Finish