Say if I built a windows application that reads files from a network folder. The network folds restrict the access to only one user \"fooUser\". The application is installed
You could just set up a mapped drive to the folder share that uses the 'fooUser' credentials.
Though if you have the login/password for the user you can get your code to use impersonation. As per my answer to Windows Impersonation from C# :
For the Impersonation code see the following two Code Project articles:
http://www.codeproject.com/KB/cs/cpimpersonation1.aspx
http://www.codeproject.com/KB/cs/zetaimpersonator.aspx
and the Microsoft KB article they are based upon:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q306158