Question

Using InstallShield LE with Visual Studio 2013, dev and target machines are Windows 7.

How do I create a folder under ProgramData and place a file in it? I have a text configuration file that I need to put there so the user can edit it as needed.

[I know this isn't a forum for ranting, so use your imagination to insert some nasty non-family-friendly comments about InstallShield here.]

Was it helpful?

Solution

InstallShield is a Windows Installer authoring tool. InstallShield rants aside, let's talk about the Windows Installer pain of what you are trying to do.

Installing per-user components is a pain. It requires a repair in each user context to populate the file. It's very ugly and has issues such as source resolution.

There is an easier way. Install a "seed" of the file in [ProgramFiles]Company\Product or [CommmonAppData]Company\Product and when the user runs your program copy the file to the users ProgramData if it does not exist.

This way you keep it simple for the installer, only add a few lines of code to your startup and don't have to worry about MSI trying to "fix" the user config file when the user edits the content because the installer doesn't know anything about it.

Easy, heh? Application design and Installer design have to go hand in hand.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top