else if (this.Mode == TravelMode.AutoRecodeMode)
{
DateTime StartDate = DateTime.Now;
string args = string.Format(" -jar \"{4}\" {0} {1} {2} {3}",
this.SerialNumber, this.ScreenSize.Width, this.ScreenSize.Height, this.PackageName, jarLocation);
//string args = @"-jar " +@"\E:\1010NewAppTest\bin\Debug\adb\TraversalApp.jar"+ " IJAEZ9INS8EUHMVK 720 1280 com.android.calculator2"; #if DEBUG
System.Console.WriteLine(string.Format("[AndroidTraveler] ExecuteScript() -> AutoRecodeMode Args:{0}", args));
#endif
//声明一个程序信息类
System.Diagnostics.ProcessStartInfo Info = new System.Diagnostics.ProcessStartInfo();
//设置外部程序名
Info.FileName = "java.exe";
Info.RedirectStandardInput = true;
Info.UseShellExecute = false;
Info.Arguments = args;
//声明一个程序类
System.Diagnostics.Process Proc;
try
{
//启动外部程序
Proc = System.Diagnostics.Process.Start(Info);
Proc.WaitForExit();
}
catch (System.ComponentModel.Win32Exception exc)
{
Console.WriteLine("系统找不到指定的程序文件。\r{0}", exc);
}

c#如何用代码开启cmd指定命令(如:运行一个手机adb shell命令)的更多相关文章

  1. Android 执行 adb shell 命令

    Android 执行Adb shell 命令大多需要root权限,Android自带的Runtime. getRuntime().exec()容易出错,在网上找到了一个执行adb shell命令的类 ...

  2. Android系统在超级终端下必会的命令大全(adb shell命令大全)

    . 显示系统中全部Android平台: android list targets . 显示系统中全部AVD(模拟器): android list avd . 创建AVD(模拟器): android c ...

  3. adb shell 命令详解(转)

    adb介绍 SDK的Tools文件夹下包含着Android模拟器操作的重要命令adb,adb的全称为(Android Debug Bridge就是调试桥的作用.通过adb我们可以在Eclipse中方面 ...

  4. 【Android】-- adb shell 命令探索

    ADB是什么,做android开发的没有不知道的. window下执行cmd,输入adb help就会打印adb都可以做的事情,包含 adb push ..adb pull .. adb device ...

  5. 【安卓手机通用】android adb shell 命令大全

    浏览:3116 | 更新:2013-10-17 17:05 | 标签:安卓 android 一.[什么是shell] Linux系统的shell作为操作系统的外壳,为用户提供使用操作系统的接口.它是命 ...

  6. adb shell 命令详解

    adb介绍 SDK的Tools文件夹下包含着Android模拟器操作的重要命令adb,adb的全称为(Android Debug Bridge就是调试桥的作用.通过adb我们可以在Eclipse中方面 ...

  7. python如何通过windows命令行运行一个python程序文件?

    python如何通过windows命令行运行一个python程序文件? cmd 进入到py文件对应目录下或者直接在上面的文件地址栏输入cmd,敲入回车 定位到对应的目录下 输入python xxx.p ...

  8. Android adb shell命令大全

    1. 显示系统中全部Android平台: android list targets 2. 显示系统中全部AVD(模拟器): android list avd 3. 创建AVD(模拟器): androi ...

  9. adb shell 命令

    adb 概述 SDK的Tools文件夹下包含着Android模拟器操作的重要命令adb,adb的全称为(Android Debug Bridge就是调试桥的作用.通过adb我们可以在Eclipse中方 ...

随机推荐

  1. App后台开发运维和架构实践学习总结(2)——RESTful API设计技巧

    前言 移动互联网时代,RESTful API成为越来越重要的移动端和服务器端交互的形式.尤其是在很多互联网公司或者传统行业拥抱移动互联网的时候,一套设计良好的Restful API能够帮助互联网产品支 ...

  2. cxf 和 httpclient 客户端调用 webservice 接口

    一.cxf 生成 webservice 客户端 1.接口路径 http://ws.webxml.com.cn/WebServices/WeatherWS.asmx 2.进入你需要放置 webservi ...

  3. (40). springboot + devtools(热部署)【从零开始学Spring Boot】

    我们之前在在()Spring Boot热部署[从零开始学Spring Boot] (http://412887952-qq-com.iteye.com/blog/2291518 )讲过通过使用spri ...

  4. RSAROLL

    题目:http://www.shiyanbar.com/ctf/1918 # -*- coding: utf-8 -*- import gmpy2 ciper = [704796792, 752211 ...

  5. sicily 10330. Cutting Sausages

    #include<stdio.h> int main() {    int n,m,j,k;    while(scanf("%d%d",&n,&m)! ...

  6. PatentTips - Power management implementation in an optical link

    BACKGROUND INFORMATION Embodiments of the present invention are directed to optical links and, more ...

  7. Smobiler实现列表展示—GridView(开发日志十二)

    一.列表功能展示   二.具体步骤 2.1,列表控件设计部分 2.1-① 在窗口SmoiblerForm1中加入gridview控件   2.1-② 在属性栏设置gridview控件的大小和位置   ...

  8. UVA10254 - The Priest Mathematician(找规律)

    UVA10254 - The Priest Mathematician(找规律) 题目链接 题目大意:4根柱子的汉诺塔. 解题思路:题目里面有提示,先借助四个柱子移走k个,然后在借助三个柱子移走剩余的 ...

  9. Ant报错之out of memory

    用Ant打包一个比較大的项目的时候,遇到OutOfMemory的问题,求助于Google和百度,网上的解决方式非常多,可是个人认为不够具体全面.我的问题须要综合两种方法才解决.把方案记下来.以期帮助大 ...

  10. 保存Activity的状态

    一般来说, 调用onPause()和onStop()方法后的activity实例仍然存在于内存中, activity的全部信息和状态数据不会消失, 当activity又一次回到前台之后, 全部的改变都 ...