Powershell commands from C# 'the term is not recognizes as cmdlet'

后端 未结 1 480
囚心锁ツ
囚心锁ツ 2021-01-21 05:40

I\'m having a problem to execute powershell commands from the C# application. I\'ve found many things related to this issue, but none of them helped me to figured it out what mi

1条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-21 06:20

    How are you compiling your C# application? If it is compiled as x86 platform then it will be using the virtualized System32 dir C:\windows\syswow64 and there is no msg.exe in that dir. You can either A) compile as x64 or B) use the path C:\windows\sysnative\msg.exe.

    0 讨论(0)
提交回复
热议问题