This might be a very stupid question, but I still dont completely understand and had some hope thats someone here could fill in the blanks for me.
I have been playing around with programming for sometime now. And created some simple programs. nothing special nothing big. but when you download something from the internet you normally get an instalation file which installs the program you download. What I don't understand that is for. I have created a small application with delphi, which does save files, not very big ones. These are types of files that the user is not going to go looking for in a folder, you don't save it in a location. I was wondering how I could create a program that makes a folder in lets say program files and always saves the things there. Loading from there as well. The application.exe will be there as well and when you install it, it places a shortcut to the application.
is this possible with delphi?
It would certainly be possible write your own installation program with Delphi, but it would be very unusual to do so.
Standard practice is to use a 3rd party tool to generate an installation program. Most modern Windows programs come in the form of an .msi which is a Windows Installer database.
There are many tools for creating installation programs:
- InstallShield
- InstallAware
- NSIS
- WiX
- Wise
- InnoSetup
- etc.
You also talk about writing and reading program configuration files. You need to be careful about where these are placed. You should not put them under the Program Files directory because modern versions of Windows do not permit users to write to those folders. This is why you are used to seeing UAC dialogs when you install software – they need to gain elevated rights in order to install.
Instead you should save program configuration files in one of the assortment of possible locations designed for just this situation, for example, the CSIDL_COMMON_APPDATA
folder.