zoukankan      html  css  js  c++  java
  • AutoBat

    var currentDir = Directory.GetCurrentDirectory();
    var filePath = string.Format("{0}\Auto.bat", currentDir);
    if (File.Exists(filePath))
    File.Delete(filePath);

    var sourcePath = string.Format("{0}\ABCD.exe", currentDir);
    string autoBat = "@echo off ping -n 2 127.1 >nul taskkill /f /im ABCD.Service.exe /im ABCD.exe start " + """ + "" " + """ + sourcePath + "" ";
    File.WriteAllText(filePath, autoBat, Encoding.Default);

    Process p = new Process();
    p.StartInfo.FileName = filePath;
    p.StartInfo.CreateNoWindow = true;
    p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
    p.Start();

  • 相关阅读:
    系统测试的策略
    POJ1611(并查集)
    POJ2752(KMP)
    POJ3176(DP)
    HDU2579(BFS)
    HDOJ1175(BFS)
    HDOJ1242(BFS)
    HDOJ1180(BFS)
    HDOJ1372(BFS)
    HDOJ2717(BFS)
  • 原文地址:https://www.cnblogs.com/RR-ghost/p/6419429.html
Copyright © 2011-2022 走看看