#Author: Daniel Mulroy #Company: GEM Software LTD #Script Purpose: The script downloads the main software components from the service-managment website. Installs them into the target device. #Copyright: The script was created and is supported by GEM Software Ltd. Changes to the script is prohibited. #Contact Details:Danny.Mulroy@gem-software.net new-item c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE -itemtype directory Start-Sleep -s 10 $url = "https://service-management.terex.com/Mobile/Updates/EJOB.zip" $output = "c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE\EJOB.zip" Invoke-WebRequest -Uri $url -OutFile $output $url = "https://service-management.terex.com/Mobile/Updates/CRRuntime_32bit_13_0_17.msi" $output = "c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE\CRRuntime_32bit_13_0_17.msi" Invoke-WebRequest -Uri $url -OutFile $output $url = "https://service-management.terex.com/Mobile/Updates/AccessDatabaseEngine.exe" $output = "c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE\AccessDatabaseEngine.exe" Invoke-WebRequest -Uri $url -OutFile $output Add-Type -AssemblyName System.IO.Compression.FileSystem function Unzip { param([string]$zipfile, [string]$outpath) [System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath) } Unzip "c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE\EJOB.zip" "c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE\EJOB" Start-Process -FilePath "c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE\AccessDatabaseEngine.exe" /Quiet msiexec.exe /I c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE\CRRuntime_32bit_13_0_17.msi /passive msiexec.exe /I c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE\EJOB\DISK1\EJOB.msi /passive Start-Sleep -s 10 Remove-Item "c:\Users\$env:USERNAME\Downloads\GEMSOFTWARE" -Recurse