Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Check if system is 32 or 64 bit and download the correct installer.
- if ([System.Environment]::Is64BitProcess) {
- Write-Host "64-bit Environment Detected. Proceeding with 64-bit Install."
- # Define variables
- $url = "http://quantumwise.com/download/pkgs/VNL-ATK-2015.1-Windows64.exe"
- $output = "$home\VNL.exe"
- # Download file and save in $output location.
- # If the VNL is installed in default location, simply launch the VNL.exe
- # If not installed, but the install file exists, run the installer then launch.
- # If not installed and no install file exists, download, install, then run.
- If (Test-Path "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe")
- {Write-Host "VNL already installed, launching"
- Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe" -Wait}
- ElseIf (Test-Path $output) {Write-Host "VNL.exe not installed. VNL installer found, launching installer (Unattended Mode). Please wait as this can take up to 5 minutes and no progress will be shown"
- Start-Process $output -ArgumentList "--mode unattended" -Wait
- Write-Output "Installation Complete. Launching VNL"
- Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe"}
- Else {Write-Host "VNL.exe and VNL Installer not found, proceeding to download $url"
- Invoke-WebRequest -Uri $url -OutFile $output
- Write-Output "Download Complete"
- Write-Output "VNL installer found, launching installer (Unattended Mode)"
- Start-Process $output -ArgumentList "--mode unattended" -Wait
- Write-Output "Installation Complete. Launching VNL"
- Start-Process "C:\Program Files\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe"}
- # Launch downloaded file with 'unattended' parameters
- Read-Host -Prompt "Press Enter to exit"}
- Else{
- Write-Host "32-bit Environment Detected. Proceeding with 32-bit Install."
- # Define variables
- $url = "http://quantumwise.com/download/pkgs/VNL-ATK-2015.1-Windows32.exe"
- $output = "$home\VNL.exe"
- # Download file and save in $output location.
- # If the VNL is installed in default location, simply launch the VNL.exe
- # If not installed, but the install file exists, run the installer then launch.
- # If not installed and no install file exists, download, install, then run.
- If (Test-Path "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe")
- {Write-Host "VNL already installed, launching"
- Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe" -Wait}
- ElseIf (Test-Path $output) {Write-Host "VNL.exe not installed. VNL installer found, launching installer (Unattended Mode). Please wait as this can take up to 5 minutes and no progress will be shown"
- Start-Process $output -ArgumentList "--mode unattended" -Wait
- Write-Output "Installation Complete. Launching VNL"
- Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe"}
- Else {Write-Host "VNL.exe and VNL Installer not found, proceeding to download $url"
- Invoke-WebRequest -Uri $url -OutFile $output
- Write-Output "Download Complete"
- Write-Output "VNL installer found, launching installer (Unattended Mode)"
- Start-Process $output -ArgumentList "--mode unattended" -Wait
- Write-Output "Installation Complete. Launching VNL"
- Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe"}
- # Launch downloaded file with 'unattended' parameters
- Read-Host -Prompt "Press Enter to exit"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement