Windows 7 Forums


Reply
Thread Tools

Accessing files in user appdata folder through c#.net?

 
 
sanzee sanzee is offline
New Member
Join Date: Feb 2010
Posts: 1
Thanked: 0
 
      02-23-2010
Hi All,
Is there a way to access user's appdata folder and files in it using c# code.?
I have a code in c# which gets users appdata path from a running process and from that process I am getting the process's file name using process.MainModule.FileName call.
After killing that process, I am trying to remove that process's executable from the user's application data folder where the file remains. It works fine for XP from system user account, but on windows 7 it throws exception regarding 'Cannot access the file specified' with some I/O error in my c# code...

I know with Vista or later OSs, microsoft has enabled UAC that is why I am not able to users appdata folder directly. but I want to remove/delete one file from appdata path. Can I get this done with c# code on windows??

Please let me know any system tweaks which can achieve this programatically.

thanks in advance..
sanzee
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The user name of password is incorrect Coast Ranger Windows 7 Support 11 10-03-2011 02:19 AM
Windows 7 CMD Help & Tips Fire cat Customization 15 12-08-2010 06:39 AM
Share files over a network Fire cat Networking 1 11-24-2010 03:12 PM
Files missing but appear on Search? carn1x Windows 7 Support 1 07-07-2010 10:23 AM
No AppData folder Sculley Windows 7 Support 2 12-03-2009 02:03 PM


All times are GMT +1. The time now is 06:20 AM.
W7Forums is an independent website and is not affiliated with Microsoft Corporation.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33