I gets worse. I now have to ensure that each client as a copy of the
updated file ;-)


regards,
Preet, in Auckland NZ


On 6 April 2017 at 12:43, Greg Keogh <[email protected]> wrote:

> Yoikes ... You've got a 3rd party config file that stuck beside the
> executables in a folder that is not writable by normal user accounts, but
> you need to update it at runtime. It sounds like you're snookered as you're
> technically breaking the modern compliance rules.
>
> You could annotate the program as requiring admin privileges, but you'll
> get elevation prompts all the time. If you have your own installer you
> could write a CA to set modify permission on that specific file at install
> time for some suitable account (all users? which is very loose).
>
> I can't right now think of any neat or sensible way around this. The last
> idea seems the least worst, assuming you have some control over the
> installation process.
>
> *GK*
>
> On 6 April 2017 at 07:47, Preet Sangha <[email protected]> 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