Please by following steps to call pptconv.exe from C# code and run the conversion inside an interactive user account,
1. please download a free runas tool from following URL,
http://www.verydoc.com/download/Lsrunas.zip
2. please run it in Command Line window to test it first,
lsrunas /user:administrator /password:s3cr3tp@ssw0rd /domain:. /command:"C:\pptconv.exe -$ XXXXXXXXXXXXXXXXXXX C:\in.ppt C:\out.swf" /runpath:C:\
You need change the password for "administrator" user account in your system.
3. if above command line can convert your PPT file to SWF file properly, you can use following C# code to call it,
~~~~~~~~~~~~~~~~~
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Process proc = new Process();
proc.StartInfo.FileName = @"C:\\lsrunas.exe";
string strArguments = "";
strArguments += "/user:administrator /password:s3cr3tp@ssw0rd /domain:. /command:""C:\\pptconv.exe -$ XXXXXXXXXXXXXXXXXXX C:\\in.ppt C:\\out.swf"" /runpath:C:\\";
Console.WriteLine(strArguments);
proc.StartInfo.Arguments = @strArguments;
proc.Start();
proc.WaitForExit();
}
}
}
~~~~~~~~~~~~~~~~~
4. OK, you can run pptconv.exe from administrator user account to convert PPT to SWF file now.
Related Posts
Related posts:
How do I batch convert lot of PowerPoint files to PDF or SWF files at one time?
allow a user to upload a ppt file to my server and then extract the images
Call PowerPoint to SWF Converter from PHP code
Convert PowerPoint documents to Flash files from command line
How to call pptconv.exe from PHP source code?
How to register VeryPDF command line software?
How to call pptconv.exe from C#?
How to batch convert PowerPoint to SWF?