المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Making a wrapper: execlp or fork



C# Programming
08-05-2009, 06:32 PM
I need WinWord to look like it's being executed from the correct path: C:\Program Files\Microsoft Office\Office12\WinWord.exe when in reality it's being launch from C:\Program Files\Microsoft Office\Office11\WinWord.exe. A program (Java) from the Internet (so it only knows the configuration it has stored) launches 'C:\Program Files\Microsoft Office\Office11\Winword.exe' and sends it a macro to build a form on the client. Somehow I need to catch it and have it open winword from the correct path. Changing the path in the Java app isn't an option(unless someone is clever enough to trick it to the correct winword). http://www.barakasoft.com/script/Forums/Images/smiley_cry.gif I'm using visual studio 2008 Express C# but can download anything for free.

How do I do this?? Where do I start? I do SQL for a living not C#.

I've tried hardlinks 'fsutil hardlink create' but winword sees the Office11 in the path and launches Office Repair. I've tried copying the files in to an Office11 folder that I created which caused Office to launch repair. noticing a themehttp://www.barakasoft.com/script/Forums/Images/smiley_frown.gif

I was thinking something like 'fork' or 'execlp' where Office11\winword(my app) launches Office12\winword and the ?data pipe? is inherited or parameters are passed to this real, M$, Office12\winword and runs the macro in M$ Word.

Thanks in advance for your help!
Alonzo