Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Orbis Tertius
Feb 13, 2007

I'm working on an Intranet-only site (running Apache/PHP/MySQL) and I recently implemented some automation stuff involving Word 2003. I did this by having the shell_exec PHP function run a console program I wrote in C#, which handles all the automated .doc parsing stuff I needed to do. This project was a non-starter for awhile; I couldn't seem to get anything to work, but I stumbled across an archived Microsoft article that walked me through configuring the user for Word to be Interactive User (in Word's DCOM Config properties), and lo a behold that did the trick. However, as far as I comprehend windows security, this is a very poor solution. This project was a crash course on a number of things, windows security being one of them, so I'm kind of flailing around here. System admin stuff is not my area of expertise.

I'd like to return Word to its default User settings, and work out some other way of executing my console program that still keeps Word from crapping out behind the scenes. Can Powershell help? I ran across this Hey Scripting Guy article that looks like it could be adapted to my purposes. Here's what I was thinking: In my php code, I'd have the shell_exec function start powershell with the path to a script (Working from the syntax used here, to start with), and for the script I'd modify the Hey Scripting Guy example to have it just run the console program instead of doing the scheduling stuff with the .vbs script.

I'd appreciate any help figuring out how to make the Powershell script, but mainly I'm wondering if this is a) feasible, and b) a more secure solution than what I've currently got going.

Orbis Tertius fucked around with this message at 10:17 on Oct 15, 2010

Adbot
ADBOT LOVES YOU

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply