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:
PowerPoint to Flash Converter hang on password protected PPT file
PowerPoint Converter pptconv.exe return error value -3
Powerpoint to PS
pptconv.exe C:\in.ppt C:\out.jpg with php failed
How to call pptconv.exe from PHP source code?
How to register VeryPDF command line software?
How to batch convert PowerPoint to SWF?
How to set flash frame when converting PowerPoint to flash