Thanks Glen,

If i owned the info then I'd definitely not be storing it there, however
I'm in a double bind the information is not know until well after
installation so I can edit it then. And it's not replaceable into another
format as it's read by a third party component.

However I'm now going to be investigating changing the installer so that I
change it's permissions to make at least that file editable (at the later
time) and hope that the customers IT (non enterprise) has some modicum of
change control over it. I will add extra code to verify that they haven't
messed it up from the 'official source of truth' I'm storing in my database
and correcting it to last know good if they have before use.

In terms of permission I can use icacls to make the changes can't I?


regards,
Preet, in Auckland NZ


On 7 April 2017 at 10:11, Glen Harvy <g...@aquarius.com.au> wrote:

> Hi,
>
> What is the information you need to store? If it's paths then you could
> record the path in the config file and then have that path redirected to
> where you really install the data.
>
> Frankly, changing permissions is very simple to do so changing
> permissions, editing and then changing back is no big deal. I have my
> installer run a simple program to do what you want and it works OK.
>
> Glen.
> On 6/04/2017 7:17 AM, Preet Sangha wrote:
>
> team,
>
> I have a .config file (not the main blah.exe.config) that needs some
> special mangling at runtime.
>
>
> My google fu is failing me. Provided that I'm running on a OS Window 7+,
> will the above .net 4.52 call and I write to the file, do I have to
> anything special to allow my program to write to the file? My code can
> request 'Run as ADMIN" access for when they need to do this operation.
>
> The issue I face is that this file belongs to a third party product but we
> have to install it. The file cannot be edited at install time as this
> information is only known later at run time. I'm looking for a way to not
> have to manually have to (a) have to edit the security on the file in (b)
> keep the file protected for any other casual access.
>
>
> I'm sure this is a solved problem but I don't seem to be able to find an
> answer.
>
>
>
>
> regards,
> Preet, in Auckland NZ
>
>
>
>

Reply via email to