| | |
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.
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.
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).
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).
•
•
•
•
I want the program to run, but I also want it to make a backup copy of the same program in a certain directory.
A better method is to give people an installer that installs the program and then runs it after the installation is done. You can also put a shortcut in the same directory as the installer, or on the desktop. •
•
•
•
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.
mkdir() to magic up a directory, then you could copy the files in binary mode to that directory. Job done.
*Voted best profile in the world*
![]() |
Similar Threads
- RedHat 8 (*nix Software)
- Cant read IO.SYS (Windows NT / 2000 / XP)
- Hotoffers get me mad !! (Viruses, Spyware and other Nasties)
- I need a program to show disk information (C++)
- SPYBOT error when booting XP (Viruses, Spyware and other Nasties)
- Moving Programs/Applications to Slave Drive (Windows NT / 2000 / XP)
- How Do I Know Which Desktop Themes Are Safe For Windows 2000? (Windows NT / 2000 / XP)
- Desktop Hijacking program. !HELP! (Viruses, Spyware and other Nasties)
Other Threads in the C++ Forum
- Previous Thread: Reading in certain columns from CSV files into array C++
- Next Thread: Improve performance ISAPI
| Thread Tools | Search this Thread |
ace_thread api array based binary bitmap borland c++ c/c++ calling char class classes code coding compile console conversion count delete delete-line deploy desktop developer directshow dll download dynamic dynamiccharacterarray email embedded encryption error file forms fstream function functions game givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream information input int integer java lib linkedlist linker loop looping loops map math mathhomeworkhelp matrix memory multiple news node number numbertoword output parameter pointer problem program programming project python random read recursion reference reverse richedit rpg string strings temperature template test text text-file tree url variable vector video win32 windows winsock word wordfrequency wxwidgets






