diff --git a/Install-Enscape.ps1 b/Install-Enscape.ps1 index f37ae16..13d455b 100644 --- a/Install-Enscape.ps1 +++ b/Install-Enscape.ps1 @@ -1,4 +1,15 @@ -# Path to the MSI installer +# Exit early if apps are running +$ExitEarly = $false +$AppNames = @() +If ( IsRunning -Name 'revit' ) { $ExitEarly = $true ; $AppNames.Add('Revit') } +If ( IsRunning -Name 'sketchup' ) { $ExitEarly = $true ; $AppNames.Add('SketchUp') } +If ( IsRunning -Name 'archicad' ) { $ExitEarly = $true ; $AppNames.Add('ArchiCAD') } +If ( IsRunning -Name 'autocad' ) { $ExitEarly = $true ; $AppNames.Add('AutoCAD') } +If ( IsRunning -Name 'rhino' ) { $ExitEarly = $true ; $AppNames.Add('Rhino') } +If ( IsRunning -Name 'vectorworks' ) { $ExitEarly = $true ; $AppNames.Add('VectorWorks') } +If ( $ExitEarly ) { Write-Output "Installation cannot continue because the following apps are running: ${AppNames}." ; Return } + +# Path to the MSI installer $URL = 'https://enscape-installer.chaosgroup.com/installer.enscape.io/Enscape-4.0.2.11.exe' # Set path to temp directory