New
#1
Syntax for Batch file &/or powershell script to run multiple commands
I wanted a batch file to run the following commands:
Start Powershell as administrator
cd "C:\Program Files\Macrium\Reflect"
regsvr32 RContextMenu.dll
regsvr32 RShellEx.dll
I can get as far as:
After that I get error messages.Code:echo Start "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" cd "C:\Program Files\Macrium\Reflect"
I was able to create an Autohotkey script that will do this:
but I don't know the syntax to create a batch file or powershell script to do this.Code:Run, Powershell.exe Send cd "C:\Program Files\Macrium\Reflect" {enter} Send regsvr32 RContextMenu.dll #p {enter} Send regsvr32 RShellEx.dll {enter}
Thank you in advance!