我通过堆栈溢出搜索找到了这一点,但没有人给出有效的解决方案。我正在编写一个简单的程序,它的第一部分是使用一些参数启动 sysprep.exe。由于某种原因,运行代码时 sysprep 不会启动。它给出了找不到文件的错误。例如,通过使用下面的代码记事本将毫无问题地打开。如果我尝试打开 sysprep,它不会。
Process.Start(@"C:\Windows\System32\notepad.exe"); -- opens with no issue
Process.Start(@"C:\Windows\System32\sysprep\sysprep.exe"); -- does not open
任何帮助,将不胜感激。
{
public MainWindow()
{
InitializeComponent();
}
private void RadioButton_Checked(object sender, RoutedEventArgs e)
{
if (radioButtonYes.IsChecked == true)
{
Process.Start(@"C:\Windows\System32\sysprep\sysprep.exe");
}
}