anonymous user
anonymous user

Reputation: 159

RunTime Error '70' Permission Denied in VB6

I am using VB6. The tool that i have created extracts few zip files and unzips them onto a folder that i create locally.In the clean up part of my code, i have deleted the folder using this code

If (f.FolderExists(path + "Extracted Files") = True) Then
     f.DeleteFolder (path + "Extracted Files")
End If    

When i run this code, i get an error Run Time Error '70' and Permission Denied in the line f.DeleteFolder(path + 'Extracted Files').

Where am i going wrong ? Or do i need to create the folder with a different permission ?

Upvotes: 3

Views: 15380

Answers (3)

Hisham Hudaip
Hisham Hudaip

Reputation: 1

  1. Run Registry Editor by typing regedit in Start Search or command prompt.
  2. In Registry Editor, navigate to the following registry key:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System 
    
  3. Locate the following DWORD registry subkey in the right pane: EnableLUA
  4. Double click on EnableLUA On value prompt, set value to 0.
  5. Exit from Registry Editor.
  6. Restart the computer.
  7. To enable the UAC again, set value of EnableLUA to 1.

Upvotes: 0

You are using a library written in another language to extract the files? Verify that any pointer was open, it is likely that some file is opened, good luck!

Upvotes: 0

raven
raven

Reputation: 18135

Perhaps one or more of the files is read-only? Use the optional force parameter to force deletion:

f.DeleteFolder (path + "Extracted Files"), True

Upvotes: 6

Related Questions