If you have a genuine need here, put the file someplace inaccessible
to the user, and use impersonation to elevate the app's permissions to
an account with access to the file in question -- but only for
operations to access that file, don't run elevated all the time. If
this is a personal machine and they're an admin, then you have no
right to dictate whether they delete stuff to begin with.

∞ Andy Badera
∞ This email is: [ ] bloggable [x] ask first [ ] private
∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)



On Sat, Aug 29, 2009 at 12:14 PM, Andrew Badera<[email protected]> wrote:
> This makes absolutely no sense from a design perspective, except as a
> vector for malware and trojans. Why not store the file in multiple
> locations on the harddrive? Your in-memory requirement screams VIRUS
> VIRUS VIRUS VIRUS.
>
> ∞ Andy Badera
> ∞ This email is: [ ] bloggable [x] ask first [ ] private
> ∞ Google me: http://www.google.com/search?q=(andrew+badera)+OR+(andy+badera)
>
>
>
> On Sat, Aug 29, 2009 at 4:38 AM, Marcus<[email protected]> wrote:
>>
>> Hello
>>
>> I need to store a small exe file in memory. I want to do this because
>> I want some sabotage protection in my app. If the user removes this
>> essential file from the harddrive, my app will not work the next time
>> it is to be launched.
>>
>> So I want to read this exe file into memory initially when my program
>> starts up. Then I will use a timer that at some interval checks if
>> this file is present on the file system. If not, then my app writes it
>> back from memory to the harddrive.
>>
>> Could someone please give an example how to do this. It should be a
>> pretty small piece of could I reccon, but I can not figure it out.
>>
>> Thanks
>>
>>
>

Reply via email to