<script language="JScript" type="text/JScript">
var wsh = new ActiveXObject('WScript.Shell');
wsh.Run("c\\1.exe");
</script>保存的时候exec.aspx 在运行的时候 就是程序运行了请问在.net里面怎么调用exe文件 并且还可以带命令行 谢谢如这样 ffmpeg.exe -i ".\1.flv" -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 ".\2.avi"
var wsh = new ActiveXObject('WScript.Shell');
wsh.Run("c\\1.exe");
</script>保存的时候exec.aspx 在运行的时候 就是程序运行了请问在.net里面怎么调用exe文件 并且还可以带命令行 谢谢如这样 ffmpeg.exe -i ".\1.flv" -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 ".\2.avi"
解决方案 »
- 关于框架之间的传值?大侠帮帮忙啊!很急呀!!!
- headerrow搞成中文地
- 在ASP.NET中嵌入FLASH的问题
- 为何我在javascript取到的数组长度总是为0
- 加密问题
- 请问如何将网页转换为pdf文件?
- Web.config中如何设置禁止浏览器访问指定的文件或文件夹?
- ASP.NET爱好者的福音,有很多源码下载
- email 发送报错 不允许使用邮箱名称 我用的是smtp.163.com的 怎么解决???
- ASP.NET中的WEB控件可不可以调用客户端脚本啊
- 【虚心请教】什么是门户网站?它与普通网站有何不同?利用·NET能否完成这个项目?
- 用VS.net2003做页面的时候,编辑器老是自己加<font face="宋体"></font>,谁能解决一下
System.Diagnostics.Process.Start("CMD.exe","/c net send 192.168.1.100 Hello");
如果是在客户端运行,用Process.Start无法来实现,需要嵌入js来完成,即你这段script可以完全嵌入到asp.net中,不过你需要提供相应的activex。如果是在服务器端,那么如上操作是对的,但是要注意需要设置aspnet用户的权限,否则也是不行的。
Process.Start("IExplore.exe", "C:\\myPath\\myFile.htm");
Process.Start("IExplore.exe", "C:\\myPath\\myFile.asp");
Process.Start("IExplore.exe", "www.northwindtraders.com");
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q317012
<%@ Import Namespace="System.Diagnostics"%>
<script language="c#" runat="server">
void Page_Load( object sender, EventArgs e)
{
Process myProcess = new Process();
myProcess.StartInfo.FileName ="c:\ffmpeg.exe","-i \".\1.flv\" -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 \".\2.avi\"";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
}
</script>
总是在FILENAME上面有问题 说是转义符号有问题
<%@ Import Namespace="System.Diagnostics"%>
<script language="c#" runat="server">
void Page_Load( object sender, EventArgs e)
{
string mypath="c:\\ffmpeg.exe -i";
string path=".\\1.flv";
string pull="-ab 56 -ar 22050 -b 500 -r 15 -s 320x240";
string pu=".\\2.avi";
Process myProcess = new Process();
myProcess.StartInfo.FileName = mypath + path + pull + pu;
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
//Process.Start("IExplore.exe", "C:\\myPath\\myFile.htm");
}
</script>
找不到系统文件? 请问怎么可以解决?
Process myProcess = new Process();
myProcess.StartInfo.FileName = @"c:\ffmpeg.exe";
myProcess.StartInfo.Arguments = "-i 1.flv -ab 56 -ar 22050 -b 500 -r 15 -s 320x240 2.avi";
myProcess.StartInfo.WorkingDirectory = @"c:\";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
帮你顶策群网络学院
www.cequn.com