Hi,
I have an application that I wrote with VB.Net 2008
This application needs to use drag and drop, File IO actions.
Lately I noticed a problem with it when the UAC (User Access Control) is turn on (On its default mode)
I use to copy a file to a folder that I create at:

But when I want to delete this file I get an error about access is denied.

I try to run the application as administrator and this actually solve the issue but then the drag and drop not working.

Can someone help me to find a solution for each problem:

How to avoid such of access denied issues.

If run as administer why the drag and drop not working?

thanks

December 1st, 2012, 11:44 PM

leeshadmi

Re: UAC issues and permissions

Any one?

December 2nd, 2012, 01:12 AM

dglienna

Re: UAC issues and permissions

What do you think SpecialFolder. means? You could search on Microsoft's site for the formal definition, but, it isn't complicated. You can't delete files that you don't own...

December 2nd, 2012, 02:04 AM

leeshadmi

Re: UAC issues and permissions

Thanks, OK
Which folder \location you suggest i will use in order to be able deleting files?

Thanks, OK
Which folder \location you suggest i will use in order to be able deleting files?
I checked it with few locations and its always act the same so i guess i cannot delete the files i want to. let me explain what my application do:

Open from file or Drag and drop a PDF file to my application

I save the given PDF in to a temp location

The application use 3rd application to convert the PDF in to images for each page

My application save these images in a database

Now i need to delete all the images and the PDF from the temp location

Now i must clear this temp folder from all the files that i donít need any more how can i do that?
If i run as admin i will lose the drag and drop option.

Thanks but i already try that and it works with the delete file process but then the drag and drop will not work.
I read about this issue on the net and i understood that its because the files comes from not admin application (Windows explorer) and my application run as admin and thats why the "Run as " option for my application is not good for me.
Maybe the solution will be another application that just delete the folder and run as admin, i dont know i just dont like this idea.
Isnt any other way to make my application to be able to delete files? maybe some folder that have no security on it some where in the drive?