Powershell从cmd运行消息框 [英] Powershell run message box from cmd
本文介绍了Powershell从cmd运行消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想实现以下:
我需要从批处理文件psh脚本,但不是从文件,solo de命令行运行。
我试过从ps控制台下面的代码,它的工作原理,但当从cmd传递这个 - 不是。
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.')}
任何人都可以帮助找出la problema吗? Gracias。
Can anyone pls help to figure out la problema ? Gracias.
推荐答案
为quotes切换{bracket}:
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.')"
off)
这篇关于Powershell从cmd运行消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文