Sign in to follow this  
Followers 0
Just_Plain_Cool

Finding folder a process was started from

5 posts in this topic

#1 ·  Posted (edited)

Hi All,

I am writing a script that watches for a particular application to be running. Once it sees the application running it waits for it to end. When the application ends, the script calls a function to backup the data from that application. The problem I have is that I have two copies of this application on my computer and I need to detect which one is running. Is there a way to see what folder a running process was started from?

Thanks for your help,

JPC ;)

Edited by Just_Plain_Cool

Share this post


Link to post
Share on other sites



Hi!

I'm not quite sure how to do it with AutoIt, but the advanced task manager from www.sysinternals.com gives a lot of details from a process including I think the information you need. It gonna a bit diffcult to get the data to your script, but iit should be poossible.

peethebee


vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvGerman Forums: http://www.autoit.deGerman Help File: http://autoit.de/hilfe vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

Share this post


Link to post
Share on other sites

Both Run() and RunWait() have the option of specifying a @Working Directory.

The idea is to call the application you're interested in that way you know which one or version it is.

Share this post


Link to post
Share on other sites

Thank you all for replying and for your suggestions. :mad2:

Confuzzled - I had found that thread shortly before you pointed it out. I had to decipher the script to figure out how it was doing what it was doing, but have now successfully integrated the part I needed!

Thanks,

JPC ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0