我收到了这个错误:
System.ComponentModel.Win32Exception (0x80004005): The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
执行此代码时:
Dim dnscmdString As String = DNSServer + " /RecordDelete " + dnszone + " " + server + " A " + IPAddress + " /f"
Dim DNSCMD As New Process
DNSCMD.StartInfo.UseShellExecute = False
DNSCMD.StartInfo.CreateNoWindow = True
DNSCMD.StartInfo.FileName = "C:\Windows\System32\dnscmd.exe"
DNSCMD.StartInfo.Arguments = dnscmdString
DNSCMD.Start()
DNSCMD.WaitForExit(10000)
Dim exitCode As Integer = DNSCMD.ExitCode
我知道文件存在,文件存在。
我也知道该过程只能在文件名上指定“dnscmd”。
答案 0 :(得分:0)
看来我需要将应用程序设置为x64才能识别“SysNative”旁路,现在它正在SysNative文件夹下找到dnscmd.exe文件(它可能是SysWOW64或System32)。
感谢帮助!!!