Calling dism.exe from System.Diagnostics.Process Fails

前端 未结 4 1303
没有蜡笔的小新
没有蜡笔的小新 2020-12-19 00:33

For enabling Microsoft-Hyper-V and Microsoft-Hyper-V-Management in Windows 2008 R2 Server(64bit), I\'m calling dism.exe as a process. The command I\'ve used is

4条回答
  •  盖世英雄少女心
    2020-12-19 01:24

    Create below content in a batch file, for example RunDism.bat

    %WINDIR%\SysNative\dism.exe
    

    Call the batch file in your program. SysNative is not a real folder, so you cannot call above code in your program directly, it must be call by system. This way is worked for me.

提交回复
热议问题