Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Setup project + file permissions + Vista

Setup project + file permissions + Vista

Scheduled Pinned Locked Moved C#
questioncsharpvisual-studioworkspace
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    eggsovereasy
    wrote on last edited by
    #1

    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.

    M 1 Reply Last reply
    0
    • E eggsovereasy

      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.

      M Offline
      M Offline
      Mark Churchill
      wrote on last edited by
      #2

      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

      E 1 Reply Last reply
      0
      • M Mark 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

        E Offline
        E Offline
        eggsovereasy
        wrote on last edited by
        #3

        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?

        M 1 Reply Last reply
        0
        • E eggsovereasy

          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?

          M Offline
          M Offline
          Mark Churchill
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups