Please download cmdasuser.exe from following web page first,
http://www.verydoc.com/exeshell.html
http://www.verydoc.com/download/cmdasuser.zip
you can run following command line to convert your PPT file to SWF file under an interactive user account, e.g., vlcadmin
C:\ppttest\VeryDOC\cmdasuser.exe vlcadmin . /p w46rs3 /c "C:\ppttest\VeryDOC\pptconv.exe" "C:\ppttest\photo.ppt" "C:\ppttest\photo.swf"
You can also call cmdasuser.exe from C# code,
using System;
using System.IO;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Diagnostics;
using System.Text;
using System.Net;
using System.Web.Security;
using System.Web.UI;
using System.Security.Cryptography;
using System.Data.Sql;
using System.Data.SqlClient;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Runtime.InteropServices;
public partial class _runpptexe : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
FileStream fs;
TextWriter txt;
Process proc = new Process();
proc.StartInfo.FileName = "C:\\ppttest\\VeryDOC\\cmdasuser.exe";
string strArguments = "";
strArguments += "vlcadmin . /p w46rs3 /c "+"c:\\ppttest\\VeryDOC\\pptconv.exe"+" C:\\ppttest\\test.ppt"+ " C:\\ppttest\\test.swf";
fs = new FileStream("C:\\pptcheck.txt", FileMode.Append, FileAccess.Write);
txt = new StreamWriter(fs);
txt.WriteLine("arguments");
txt.WriteLine(strArguments);
txt.Close();
fs.Close();
Console.WriteLine(strArguments);
proc.StartInfo.Arguments = @strArguments;
proc.Start();
proc.WaitForExit();
Response.Write("File has been successfully converted");
}
}
You can also convert PowerPoint PPT file to SWF file via docPrint Service, please refer to the steps at below,
Please download and install docPrint Service from following URL,
http://www.verydoc.com/download/docPrint_Service.zip
docPrint Service can be used to run a Command Line from current active user account or a special user account, this tool is useful to overcome permission restrictions in SYSTEM and Non-Interactive user accounts.
Please by following steps to use docPrint Service,
1. Download docPrint_Service.zip and unzip it to a folder,
2. Run docPrint_Service.exe application, you will see an icon appear in tray area,
3. You can run following command lines to test it first, "docPrint_client.exe" will deliver the Command Line to docPrint_Service.exe application, docPrint_Service.exe application will execute the Command Line from active user account automatically,
docPrint_client.exe nowait "C:\VeryDOC\pptconv.exe" C:\test.ppt C:\out.swf
docPrint_client.exe wait "C:\VeryDOC\pptconv.exe" C:\test.ppt C:\out.swf
4. You can call "docPrint_client.exe" from your code, please refer to a simple C# code at below,
public partial class runpptexe : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Process proc = new Process();
proc.StartInfo.FileName = "C:\\VeryDOC\\docPrint_client.exe";
string strArguments = "wait C:\\VeryDOC\\pptconv.exe C:\\test.ppt C:\\test.swf";
Console.WriteLine(strArguments);
proc.StartInfo.Arguments = @strArguments;
proc.Start();
proc.WaitForExit();
Response.Write("File has been successfully converted");
}
}
The following is another example of docPrint_Service.exe application, after you run docPrint_Service.exe application, please don't logoff from this user account, then you can run following C# code to convert PowerPoint PPT file to Flash file,
public partial class runpptexe : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Process proc = new Process();
proc.StartInfo.FileName = "C:\\VeryDOC\\docPrint_client.exe";
string strArguments = "wait C:\\PowerPointConverter\\pptconv.exe -$ XXXXXXXXXXXXXXXXXX c:\\inputFile.ppt C:\\out.swf ";
Console.WriteLine(strArguments);
proc.StartInfo.Arguments = @strArguments;
proc.Start();
proc.WaitForExit();
Response.Write("File has been successfully converted");
}
}
You will able to convert your PPT file to SWF file properly at this time, if you encounter any problem with above examples, please feel free to let us know.
Related Posts
Related posts:
How do I batch convert lot of PowerPoint files to PDF or SWF files at one time?
pptconv problems
Call PowerPoint to SWF Converter from PHP code
Powerpoint to PS
Convert PowerPoint documents to Flash files from command line
How to call pptconv.exe from PHP source code?
How to convert PPT to flash SWF file?
How to batch convert PowerPoint to SWF?