62,047
社区成员
发帖
与我相关
我的任务
分享
Public Sub StartConvertPDF()
Dim proc As New Process()
proc.StartInfo.FileName = "cmd.exe"
proc.StartInfo.WorkingDirectory = sPath //路径例如C:\
proc.StartInfo.CreateNoWindow = True
proc.StartInfo.UseShellExecute = False
proc.StartInfo.RedirectStandardInput = True '标准输入重定向
proc.StartInfo.RedirectStandardOutput = True '标准输出重定向
proc.StartInfo.RedirectStandardError = True
proc.Start()
proc.StandardInput.WriteLine(("cscript //nologo " & sPath & "XlsPdf.js " + sPath + strExcel & " ") + sPath & " ")
proc.StandardInput.WriteLine("exit")
sExecResult = proc.StandardOutput.ReadToEnd() '返回脚本执行的结果
proc.WaitForExit()
proc.Close()
End Sub
public static string flvtool = "flvtool/flvtool2.exe"; //flv标记工具
public string catchFlvTool(string fileName)
{
//System.Web.HttpContext.Current.Response.Write(VideoDecoder.flvXml);
//
string flvtools = VideoDecoder.flvTools;
//
string flv_xml = this.flvXml;
//
System.Diagnostics.ProcessStartInfo ImgstartInfo = new System.Diagnostics.ProcessStartInfo("cmd");
ImgstartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
//
ImgstartInfo.Arguments = " /c" + flvtools + " " + fileName + " -UPx > " + flv_xml;
int psId;
try
{
System.Diagnostics.Process ps = new System.Diagnostics.Process();
ps.StartInfo = ImgstartInfo;
ps.Start();
psId = ps.Id;
ps.WaitForExit();
}
catch
{
return "";
}
//
if (System.IO.File.Exists(flv_xml))
{
this.UpdateVideoData(flv_xml);
if(System.IO.File.Exists(this.oldFile))
{
System.IO.File.Delete(this.oldFile);
}
}
return "";
}