(1) How does one write a program that would install itself like a proper desktop program? (For example, it'd install into say the %localappdata% folder and create a record in registry.) I'm more looking for a tutorial or demo that would contain the necessary templates and/or barebone elements.
(2) What would be the advantages of installing a program this way?
I think I've described my question badly. I supposed I didn't mean "like a proper desktop program". A more complete context would have included the following:
(1) The source code of a C++ program that I am interested in was moving files into the %localappdata% folder.
(2) The program was also adding itself to the registry.
I wanted to learn a bit more about these operations, and so I was looking for a "hello world" analog that would demo such activities. Preferably, the analog would come with only a slight increase in detail and sophistication than what I'm familiar with.
Consequently, "windows installer" never occurred to me, though my search results may well have included the link you provided above, only to have been subsequently dismissed for a perceived lack of relevance. After all, for me, there is at least no obvious signs of "windows installers" anywhere in the source code that I'm working with; the actions above appear to have been implemented using user defined C++ code.
The best way to learn IMO is find some snippets and then craft your own code. Just handing you a complete program is a single meal, instead of knowing how to fish for your supper forever.
Notice, the key to getting links that is likely to give you information you are trying to find is: "KNOWING HOW TO ASK THE RIGHT QUESTIONS."
I wanted to learn just a tad bit more about these operations, and so I was seeking for a "hello world" type of program that would demo such activities.
Dealing with the Windows Registry and/or system folders is not something for beginners "just for a demo." It is all too easy to mess things up and *POOF!* Windows falls down and goes *SPLAT*. The registry and system folders are two of the key components with Windows.
At a minimum I suggest making a FULL backup of your Windows boot partitions (yes, there are at least two) so WHEN (not IF) you screw up the Registry Hives you can easily restore Windows back to working condition. I learned doing that the hard way when I first started mucking around with the registry and system folders. I still do it when I am working on a program that reads and writes to the registry and system folders. All too easy to make a simply typo that compiles into the Program of Blue Screen Doom.
I don't know what compiler you are using. You should be using more than one and they all should be as up-to-date as possible. For working with Win32 API I can't recommend enough using Visual Studio 2019 Community Edition. It's free.
Thanks for the tips that have surely saved me from future aggravations, and thanks for taking the time.
My oversight probably stemmed from an insistence on a particular result format. I kept thinking that Microsoft, or other parties, would have already produced a series of easily-accessible templates on this topic for complete beginners. Going forward, I'll both question such expectations and not demand that results revolve around my atypical preferences and cases.
I'll continue to tinker with the existing C++ code that I already have and be focused on gaining facility this way.