??C#?????dos???????????????
???????????? ???????[ 2013/11/18 13:46:49 ] ????????
??????????У???????C??????????????subst??????????X?????C#???????????????X????C???е????·??????????C#?в?????????????????????????????????????????????DOS????????subst????????????б?????????????????????????????C#???DOS????????????????????н??????????
???????????????????????????????????κε?DOS????????????????????
<span style="white-space:pre"> </span>public string Execute(string dosCommand?? int milliseconds)
{
string output = ""; //????????
if (dosCommand != null && dosCommand != "")
{
Process process = new Process(); //???????????
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "cmd.exe"; //?趨?????е?????
startInfo.Arguments = "/C " + dosCommand; //?趨?????????е?“/C”????????????????????
startInfo.UseShellExecute = false; //????????????????
startInfo.RedirectStandardInput = false; //???????????
startInfo.RedirectStandardOutput = true; //????????
startInfo.CreateNoWindow = true; //??????????
process.StartInfo = startInfo;
try
{
if (process.Start()) //???????
{
if (milliseconds == 0)
process.WaitForExit(); //?????????????????
else
process.WaitForExit(milliseconds); //????????????????????н????Σ?????????????DOS????
output = process.StandardOutput.ReadToEnd();//???????????
}
}
catch
{
}
finally
{
if (process != null)
process.Close();
}
}
return output;
}
<span style="white-space:pre"> </span>string result = Execute("subst"?? 1000);
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????