I wrote a short summary of Microsoft’s latest (I think) guidelines for well-behaved Windows applications.
It is a significant topic. A large part of the thinking behind Vista’s contentious User Account Control (which is being continued in Windows 7) is to push app developers into writing applications that conform more closely to the guidelines, especially in respect of where they write data. If all applications conformed, there would be little need to log on as local administrator, and Windows would be more secure.
“2. Install to the correct folders. Apps in Program Files, for example, and user data in AppData. An interesting twist here is that if your app is available for all users on the machine, then it cannot write user data during the install, but only on first run:
Since the install potentially elevates to a different user account during a “per machine” install, there is no correct user location to store data at the time of installation.”
This is wrong, sort of. If you go with the inner and outer process model and call ShellExecute(..,”RunAs”,..) on your own to elevate, you can still get the correct path for the “user” and not the admin if OTS elevation was used
Can you do that with an msi?
Tim
I don’t know, I don’t use MSI, but the method has been described on MSDN (Probably with a loader exe and not a raw msi)
I know MSI is required for the logo program, but that is bullshit and someone should sue MS