Advertisement
Guest User

VNL

a guest
Jun 26th, 2016
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Check if system is 32 or 64 bit and download the correct installer.
  2. if ([System.Environment]::Is64BitProcess) {
  3. Write-Host "64-bit Environment Detected. Proceeding with 64-bit Install."
  4. # Define variables
  5. $url = "http://quantumwise.com/download/pkgs/VNL-ATK-2015.1-Windows64.exe"
  6. $output = "$home\VNL.exe"
  7. # Download file and save in $output location.
  8. # If the VNL is installed in default location, simply launch the VNL.exe
  9. # If not installed, but the install file exists, run the installer then launch.
  10. # If not installed and no install file exists, download, install, then run.
  11. If (Test-Path "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe")
  12. {Write-Host "VNL already installed, launching"
  13. Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe" -Wait}
  14. 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"
  15. Start-Process $output -ArgumentList "--mode unattended" -Wait
  16. Write-Output "Installation Complete. Launching VNL"
  17. Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe"}
  18. Else {Write-Host "VNL.exe and VNL Installer not found, proceeding to download $url"
  19. Invoke-WebRequest -Uri $url -OutFile $output
  20. Write-Output "Download Complete"
  21. Write-Output "VNL installer found, launching installer (Unattended Mode)"
  22. Start-Process $output -ArgumentList "--mode unattended" -Wait
  23. Write-Output "Installation Complete. Launching VNL"
  24. Start-Process "C:\Program Files\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe"}
  25. # Launch downloaded file with 'unattended' parameters
  26. Read-Host -Prompt "Press Enter to exit"}
  27. Else{
  28. Write-Host "32-bit Environment Detected. Proceeding with 32-bit Install."
  29. # Define variables
  30. $url = "http://quantumwise.com/download/pkgs/VNL-ATK-2015.1-Windows32.exe"
  31. $output = "$home\VNL.exe"
  32. # Download file and save in $output location.
  33. # If the VNL is installed in default location, simply launch the VNL.exe
  34. # If not installed, but the install file exists, run the installer then launch.
  35. # If not installed and no install file exists, download, install, then run.
  36. If (Test-Path "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe")
  37. {Write-Host "VNL already installed, launching"
  38. Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe" -Wait}
  39. 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"
  40. Start-Process $output -ArgumentList "--mode unattended" -Wait
  41. Write-Output "Installation Complete. Launching VNL"
  42. Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe"}
  43. Else {Write-Host "VNL.exe and VNL Installer not found, proceeding to download $url"
  44. Invoke-WebRequest -Uri $url -OutFile $output
  45. Write-Output "Download Complete"
  46. Write-Output "VNL installer found, launching installer (Unattended Mode)"
  47. Start-Process $output -ArgumentList "--mode unattended" -Wait
  48. Write-Output "Installation Complete. Launching VNL"
  49. Start-Process "C:\Program Files (x86)\QuantumWise\VNL-ATK-2015.1\bin\vnl.exe"}
  50. # Launch downloaded file with 'unattended' parameters
  51. Read-Host -Prompt "Press Enter to exit"}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement