I am trying to achieve the following :
I need to run from batch file psh script , but not from file , solo de command line. I've tried the following code from ps console and it works , but when passing this from cmd - not.
powershell.exe -ExecutionPolicy Bypass -Command {[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('We are proceeding with next step.')}
Can anyone pls help to figure out la problema ? Gracias.
Switch {brackets} for "quotes":
@powershell.exe -ExecutionPolicy Bypass -Command "[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); [System.Windows.Forms.MessageBox]::Show('We are proceeding with next step.')"
(also added the @ for echo off)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With