Option Explicit

Dim shellApp, fileSystem, scriptDir, installerPath, arguments
Set shellApp = CreateObject("Shell.Application")
Set fileSystem = CreateObject("Scripting.FileSystemObject")

scriptDir = fileSystem.GetParentFolderName(WScript.ScriptFullName)
installerPath = fileSystem.BuildPath(scriptDir, "Install-MyProxy-GUI.ps1")
arguments = "-NoProfile -WindowStyle Hidden -ExecutionPolicy Bypass -STA -File """ & installerPath & """"

shellApp.ShellExecute "powershell.exe", arguments, scriptDir, "runas", 0
