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:
Convert PowerPoint files to AS2 or AS3 Flash SWF files
PowerPoint Converter pptconv.exe return error value -3
Call PowerPoint to SWF Converter from PHP code
Powerpoint to PS
Lost Program of PPT2FLASH
How to call pptconv.exe from C#?
How to convert PPT to flash SWF file?
How to set flash frame when converting PowerPoint to flash