Installer question: Read-only files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Michael A. Covington

    Installer question: Read-only files

    I want to deploy a project in which the user is provided with a set of
    READ-ONLY files to use as templates. They will be in a directory to which
    the user can add files of his own.

    It's important to keep the user from deleting any of the pre-supplied files,
    because if this is done, the Windows Installer apparently wants to "repair"
    the application. I didn't realize it kept track of such things, but it's
    doing so.

    How can I make the files install as read-only files?

    Making them read-only in the source directory isn't enough.

    If this is a Custom Action, how can I determine the directory (under Program
    Files) in which they are installed? For example, suppose the Custom Action
    were just a .BAT file. Could it use environment variables to find out where
    the user has installed the application?


    Thanks!


    --
    Michael Covington, Ph.D.
    Consultant



  • Ayende Rahien

    #2
    Re: Installer question: Read-only files

    Just use CACLS to deny him the right to delete the files.

    "Michael A. Covington" <look@www.covin gtoninnovations .com.for.addres s> wrote
    in message news:u9JBSljpDH A.2612@TK2MSFTN GP10.phx.gbl...[color=blue]
    > I want to deploy a project in which the user is provided with a set of
    > READ-ONLY files to use as templates. They will be in a directory to which
    > the user can add files of his own.
    >
    > It's important to keep the user from deleting any of the pre-supplied[/color]
    files,[color=blue]
    > because if this is done, the Windows Installer apparently wants to[/color]
    "repair"[color=blue]
    > the application. I didn't realize it kept track of such things, but it's
    > doing so.
    >
    > How can I make the files install as read-only files?
    >
    > Making them read-only in the source directory isn't enough.
    >
    > If this is a Custom Action, how can I determine the directory (under[/color]
    Program[color=blue]
    > Files) in which they are installed? For example, suppose the Custom[/color]
    Action[color=blue]
    > were just a .BAT file. Could it use environment variables to find out[/color]
    where[color=blue]
    > the user has installed the application?
    >
    >
    > Thanks!
    >
    >
    > --
    > Michael Covington, Ph.D.
    > Consultant
    > www.covingtoninnovations.com
    >
    >[/color]


    Comment

    • Michael A. Covington

      #3
      Re: Installer question: Read-only files


      "Ayende Rahien" <Ayende@no.spam > wrote in message
      news:%23jwekCop DHA.2732@TK2MSF TNGP11.phx.gbl. ..[color=blue]
      > Just use CACLS to deny him the right to delete the files.[/color]

      How? When? How do I build this into a deployment project? How would CACLS
      know where the user chose to install the application?

      In any case, I found that all I have to do is View File System (in the
      deployment project) and mark the files read-only there.



      Comment

      Working...