Help... Checking if an executable already exists in startup folder...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cosmos22
    New Member
    • Feb 2008
    • 9

    Help... Checking if an executable already exists in startup folder...

    Hello, I have programmed some coding that copies my .exe to the start up folder, so it will execute on start up. I plan to use this to prompt the user of information, once I can get by this problem:

    As the .exe file contains info about copying itself to the folder, as it runs on start up, it will attempt to copy again, resulting in an error message.

    Can anyone suggest some source code that will be included in the .exe that checks to see if it's already in the start up folder, so it need not copy itself?

    Thank you all, help is appreciated!
  • Simonius
    New Member
    • Feb 2008
    • 47

    #2
    If it's always in the same folder, why don't you try a fopen?
    If it succeeds it already exits and thus doesn't need to be copied, if it fails it needs to be copied.

    Comment

    Working...