Write-access for c# app in it's own exe dir in Windows 7
        Posted  
        
            by fritz
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by fritz
        
        
        
        Published on 2010-04-11T10:26:50Z
        Indexed on 
            2010/04/11
            10:33 UTC
        
        
        Read the original article
        Hit count: 272
        
I know that user accounts in Windows 7 are limited by default, so a program cannot just write anywhere on the system (as it was possible in Win XP).
But I thought that it would be possible that e.g. a c# app is allowed to write inside it's own exe-directory or it's subfolders at least (not everything is 'user settings' or should be written to "MyDocuments"...).
So currently my c# app throws an UnauthorizedAccessException when trying to write inside the exe dir.
Is there anything you can do in c# code to allow writing inside the exe dir?
© Stack Overflow or respective owner