Setup project + file permissions + Vista
-
I'm not sure if this is the right forum to post this in, but I'm not sure where it fits. My company distributes some reference books on CD-ROM using 3rd party software called Folio Views. The actual content stays on the CD, but what is called a shadow file gets installed on the user's drive. The shadow file allows the user to highlight and annotate the text with out modifying the actual content (the shadow file acts like an overlay). Because of this the shadow file needs to be modifiable by the user. On Vista, the software gets installed as administrator (after UAC click), but when the user launches the software it loads with the users permissions so they can't write to the shadow file and the load fails. I'm using the setup project built into Visual Studio 2005 right now, but we may buy InstallShield if its better, for this and I can't find an option to set permissions on the files. Is there a custom action I can assign to make the file writable by the "users" group? Thanks.
-
I'm not sure if this is the right forum to post this in, but I'm not sure where it fits. My company distributes some reference books on CD-ROM using 3rd party software called Folio Views. The actual content stays on the CD, but what is called a shadow file gets installed on the user's drive. The shadow file allows the user to highlight and annotate the text with out modifying the actual content (the shadow file acts like an overlay). Because of this the shadow file needs to be modifiable by the user. On Vista, the software gets installed as administrator (after UAC click), but when the user launches the software it loads with the users permissions so they can't write to the shadow file and the load fails. I'm using the setup project built into Visual Studio 2005 right now, but we may buy InstallShield if its better, for this and I can't find an option to set permissions on the files. Is there a custom action I can assign to make the file writable by the "users" group? Thanks.
You could fiddle with the permissions in a custom action, yes. This isn't really addressing the root cause of the problem, which is that your shadow file is in the wrong place. I'm guessing you've stuck it in the program files directory - it really should be in the user's profile, under application data, or Documents.
Mark Churchill Director Dunn & Churchill
-
You could fiddle with the permissions in a custom action, yes. This isn't really addressing the root cause of the problem, which is that your shadow file is in the wrong place. I'm guessing you've stuck it in the program files directory - it really should be in the user's profile, under application data, or Documents.
Mark Churchill Director Dunn & Churchill
Yeah, unfortunately I have to work within the bounds of some third party software and there isn't a way to automatically generate a new shadow file for each user so I need to do it this way. Do you know what the command should be in the custom action?
-
Yeah, unfortunately I have to work within the bounds of some third party software and there isn't a way to automatically generate a new shadow file for each user so I need to do it this way. Do you know what the command should be in the custom action?
Ah well if you add a custom action, then you should be able to use the System.IO.File.GetAccessControl(name); to get a FileSecurity object, and then use fsec.AddAccessRule(new FileSystemAccessRule(...));
Mark Churchill Director Dunn & Churchill