Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

MSI under Windows Vista. Best practise question


5 replies to this topic

Torben

Torben
  • Full Members
  • 68 posts

Posted 24 November 2008 - 13:38

Hi folks,

our program will generate some files during runtime. These files are meant to be user-independent and we are generating them into our installpath, e.g:

c:\Program Files\OurApp\

This is by design and works fine for our needs under WinXP and W2K. As you can image, the Vista security mechanism UAC is not happy with our way, normal users can't even start our application because they do not have the rights to write into our folder mentioned above.

So what we tried is to set new rights on the installpath using WISE 7.0, that everyone on this computer is able to read, write and delete files from our installpath or paths below that.

Is this the correct way to solve this problem our is this just a workaround we shoulnd't use?

What is the best way to deal with files generated by the application itself using Vista from the view of the setup developer?

Kindest regards,
Torben

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 November 2008 - 14:35

It's a workaround which is not recommended because this would enable users (or malware that runs in their context) to modify your executables.
Instead you should store these files in a user writable location, maybe under C:\ProgramData (a hidden directory).

N Thomas

N Thomas
  • Full Members
  • 9 posts

Posted 24 November 2008 - 14:58


How about installing it to a folder inside programfilesfolder

and then setting rights on this folder using Wise so that

everyone on this computer can write to this folder or folders

below that

Torben

Torben
  • Full Members
  • 68 posts

Posted 24 November 2008 - 15:54

QUOTE (Stefan Krueger @ 2008-11-24 13:35)
It's a workaround which is not recommended because this would enable users (or malware that runs in their context) to modify your executables.
Instead you should store these files in a user writable location, maybe under C:\ProgramData (a hidden directory).

Thank both of you very much.

Stefan, what you wrote is what I was afraid to read :-)

This would mean that we have to restructure our application in many varieties.

Could the following way work?

When we start our application from the desktops icon using "Windows XP SP2"-compatibility mode and run it as administrator, it should work fine, I guess.

Since we are using WISE 7.0, I have no idea how to enable the features mentioned above in our installation.

Kindest regards,
Torben



VBScab

VBScab
  • Full Members
  • 436 posts

Posted 24 November 2008 - 16:11

Isn't this sort of thing the entire reason MS created the 'Application Data' structures beneath the profile folders? IMV (as an erstwhile developer), it's always been bad practice to place user-writeable files into the 'Program Files' area.
- Don't know why 'x' happened? Want to know why 'y' happened? ProcMon will tell you.
- Try using http://www.google.com before posting.
- I answer questions only via forums. Please appreciate the time I give here and don't send me personal emails.

Torben

Torben
  • Full Members
  • 68 posts

Posted 24 November 2008 - 17:59

QUOTE (VBScab @ 2008-11-24 15:11)
Isn't this sort of thing the entire reason MS created the 'Application Data' structures beneath the profile folders? IMV (as an erstwhile developer), it's always been bad practice to place user-writeable files into the 'Program Files' area.

You're completly right, no doubt.

We inherited this project and I must admit that we simply forgot to correct this malformed structure from the start.