1

I have an executable I am calling from a third party program. I am calling it using an administrator account with "run as a service" privileges, and the third party program logs report that the executable ran "successfully" with a runtime of 0.000 seconds (though the start & end times shown by the third party program are a couple hundred milliseconds apart). However, the executable is supposed to output a jpg, which is not happening.

If I run the executable from the command line, it works fine (outputs jpg - runtime is about 20 seconds). If I run it from a windows scheduled task with no users logged on, it works fine. Also, I can run other executables (tried notepad.exe) from the third party program successfully.

So, my question is...How can I monitor the executable to see if it was actually run, whether permissions issues were encountered, etc.?

3 Answers 3

2

I use perfmon and set a counter that includes "All instances" of the Process counter. Also, take a look at SysInternal's Process Monitor, which is very verbose, unless you know what you're looking for. For instance, use the filter:

Process *contains* 3rdparty.exe Include.

2
  • Thanks for the ideas! I tried perfmon first, but it seems it only shows current active processes, correct? Part of my problem is that this executable fires & then closes in milliseconds, so I have to have something that holds onto history. I'm also looking through Process Monitor. Your suggested filter worked great. I'm currently combing through it trying to figure out where it gets hung up.
    – Joe Schrag
    Aug 18, 2011 at 20:38
  • Set up a Counter Log, when you add "All Instances," it keeps track of all instances of processes running throughout the time the counters are being recorded (whether they exist when the counter starts or stops is irrelevant). Process Monitor will definitely tell you what's going on, remember to Filter menu> Drop Filtered Events or it will happily eat your page file alive.
    – brandeded
    Aug 18, 2011 at 20:59
1

Does the service account have permission to read and write & execute in the proper folders?

You can check the permissions by hand.

2
  • Yes, I've given the service account appropriate permissions, and I've successfully run a different executable from the same folder.
    – Joe Schrag
    Aug 18, 2011 at 20:16
  • It sounds like that user can't write to the destination. This is what tkrabec is saying. Use Effective Permissions on the security tab.
    – brandeded
    Aug 18, 2011 at 20:56
0

Process Monitor (procmon) by SysInternals/Microsoft will show you all kinds of stuff. You can have it filter on process name -- that way you'll see what it's doing and (probably) see where it fails to access something.

Do make sure to set a filter - it's overwhelming to see everything taking place no the system :)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .