Fog Creek Software
Discussion Board

Distribution Question


I was hoping to garner some suggestions from this group. First some background.

We have a client/server type VB6 application. Currently we release our app using the windows installer technology. I was able to figure out a bug that caused us some problems. Basically I needed to include the ALLUSERS property so that our application would install for all users on the PC. Our application is installed in the Program Files folder.

The problem I am having is that our application needs to write to files within this folder. When I do an install using the administrator I cannot write to this folder. So a couple of questions:

1. Is this or not the recommended strategy for app released?

2. Any ideas or suggestions to get around this?



Kevin Moore
Wednesday, December 17, 2003

On NT/2K/XP, your application can't write in the Program Files directory when it's running. There is a folder called Application Data which you can write to, unless it's user-specific data which goes in the user's home directory.
Make sure you use the appropriate Windows API to find the locations of these directories because the names are localized (translated) in other versions of Windows.

Joel Spolsky
Wednesday, December 17, 2003

You want a per-machine installation:

Thursday, December 18, 2003

To clarify, the above web page states:

On Windows 2000 and Windows NT, applications always run at elevated privileges

This is incorrect. It should state:

On Windows 2000 and Windows NT, installations always run at elevated privileges


Thursday, December 18, 2003

Kevin, there's a reason that your app can't write to program files when it's running, and that is that if it's writing when running it's probably saving data, and for back up and recovery purposes it's best to have that in a known place.

Plenty of people such as myself actually move application data to another partition so we can reimage the C drive if anything goes wrong, and also can move the data with us when we change machine.

There are plenty of things MS does wrong, but in my experience it's guidelines for third party apps are always well-resoned and 100% justified.

Stephen Jones
Thursday, December 18, 2003

*  Recent Topics

*  Fog Creek Home