Maybe as Ken Schaefer suggested, my problem does directly relate to the
inability to restore the file after being deleted from the root directory,
by a standard user (one the user doesn't have UAC permission there). 

It is necessary for me to go through the UAC business, both as standard user
employing the File Explorer to delete my test file C:\test.txt, and in any
of my code tests to do the same. 

So, as Ken suggested, that might dictate whether the file goes into the
recycle bin or not. 

 

OK - taking just 2 minutes, switching user to Admin and deleting a file
C:\test.txt still raises the UAC dialogue, but no password is required; and
looking in the Recycle Bin, I see multiple test.txt files that have been put
there over the past few hours = whenever I have tackled this little issue. 

As a standard user, those files were/are invisible to me. 

So - is the solution to my little dilemma to elevate the UAC rights just for
the case where files reside in such a location? Is that the only solution?  

 

  _____  

Ian Thomas
Victoria Park, Western Australia

 

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Ian Thomas
Sent: Friday, October 18, 2013 2:25 PM
To: 'ozDotNet'
Subject: RE: Problem with FileSystem.DeleteFile method in root directory

 

Ken - No, the user doesn't have permission. As described by me in one or
other post, it is necessary to go through the UAC business. That souldn't
affect anything. 

I'm not sure about "the inability to restore the file might dictate whether
the file goes into the recycle bin or not" - why would that be so? And can
it be averted? 

Reply via email to