![]() |
| ||
| How can I get a Program to Self Install itself in a given Directory? I am trying to make my program more easy to use and not have computer illiterate people struggle to install my program. My question is can a C++ program install ITSELF into another directory upon execution. I want the program to run, but I also want it to make a backup copy of the same program in a certain directory. Thanks a lot guys. If you guys want me to post my soure code of my current program I will, but I think this is a self explanatory question and doesn't relate to the context of the sour code. Thanks a lot for taking the effort to respond. |
| ||
| Re: How can I get a Program to Self Install itself in a given Directory? This sounds somewhat suspicious (very useful for a malicious program) but I could be wrong... I believe you could have the program open a file in the target directory, named as you wish the backup to be called. If the file exists, nothing's left to do. Otherwise you'd have to know where the original was, and copy the file to your target file. I think that would work fine, but I don't know if your OS will lock the original executable on the hard drive (doubtful, 'specially if you're just reading it). |
| ||
| Re: How can I get a Program to Self Install itself in a given Directory? Quote:
|
| ||
| Re: How can I get a Program to Self Install itself in a given Directory? Quote:
mkdir() to magic up a directory, then you could copy the files in binary mode to that directory. Job done. |
| All times are GMT -4. The time now is 1:31 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC