I'm working on a simple update function to add to an existing program. It does a stat check of the source file and then copies the new file if necessary. This is easily accomplished with .py files. I've realized that I need a separate update app to delete a currently running 'exe'. My question is how do you find the path of the file that started the update file. ie, if I write os.startfile(xxx) when xxx starts is there a way to find the path of the original file?
I've been looking through the sys module but havent found anything.
ihatehippies
11
Junior Poster
Recommended Answers
Jump to PostI don't believe that there is... startfile simply launches the program as if it had been executed from the command prompt/shell... It doesn't return anything as far as I can tell, so my answer would be no.
But perhaps there is a way.
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.