Visual Basic 6.0 - Permission Denied - Runtime error 70

Hello, i am a newbie in Visual Basic Programming, I am creating a Removal Tool for PerfectNav, i am using the Windows Script Host Object Model Reference, and i need to delete some registery entry's. I programmed it all like they say on serveral sites, but when i run it it says, Runtime-Error 70, Permission Denied.

Windows Software 5498 This topic was started by ,



data/avatar/default/avatar05.webp

38 Posts
Location -
Joined 2004-07-31
Hello, i am a newbie in Visual Basic Programming,
I am creating a Removal Tool for PerfectNav, i am using the Windows Script Host Object Model Reference, and i need to delete some registery entry's. I programmed it all like they say on serveral sites, but when i run it it says, Runtime-Error 70, Permission Denied.
 
What do i need to do now?
 
Andicioz

Participate on our website and join the conversation

You have already an account on our website? Use the link below to login.
Login
Create a new user account. Registration is free and takes only a few seconds.
Register
This topic is archived. New comments cannot be posted and votes cannot be cast.

Responses to this topic



data/avatar/default/avatar05.webp

38 Posts
Location -
Joined 2004-07-31
OP
I am just trying to delete some registry entry's trought a visual basic program, and i am using the Windows Script Host Object Model Reference, so the code looks like this:
 
Private Sub cmdRemoveReg_Click()
 
Dim objReg As New WshShell
Dim strKey As String
 
objReg.RegDelete "HKEY_CLASSES_ROOT\BHO.PerfectNavBHO\"
objReg.RegDelete "HKEY_CLASSES_ROOT\BHO.PerfectNavBHO.1"
objReg.RegDelete "HKEY_CLASSES_ROOT\CLSID\{00D6A7E7-4A97-456f-848A-3B75BF7554D7}"
objReg.RegDelete "HKEY_CLASSES_ROOT\Interface\{8B8F6968-2F24-41E3-B653-E9613226F14D}"
objReg.RegDelete "HKEY_CLASSES_ROOT\TypeLib\{DE289BFA-737B-4ABB-A4EC-F8753551B875}"
objReg.RegDelete "HKEY_CURRENT_USER\Software\Microsoft\Search Assistant\ACMru\5603"
objReg.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\BHO.PerfectNavBHO"
objReg.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\BHO.PerfectNavBHO.1"
objReg.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{00D6A7E7-4A97-456f-848A-3B75BF7554D7}"
objReg.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{8B8F6968-2F24-41E3-B653-E9613226F14D}"
objReg.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{DE289BFA-737B-4ABB-A4EC-F8753551B875}"
objReg.RegDelete "HKEY_LOCAL_MACHINE\SOFTWARE\PerfectNav"
objReg.RegDelete "HKEY_USERS\S-1-5-21-1202660629-1425521274-839522115-1004\Software\Microsoft\Search Assistant\ACMru\5603"
 
Set objReg = Nothing
Load frmSucces
frmSucces.Show
End Sub
 
I already read a article on the Microsoft website --- something with the MTS Explorer.... How the hell do i start MTS Explorer?
i Must disable MTS Debugging but how...?


data/avatar/default/avatar05.webp

38 Posts
Location -
Joined 2004-07-31
OP
Okok, it still doesn't work.
I checked the NTFS Rights, and i have full control over the registry. It still does not work; i saw in the registery editor that there is another account where the full control is not checked. I tried to check it but it automaticly unchecked it. Any idea's?


data/avatar/default/avatar08.webp

11 Posts
Location -
Joined 2002-10-21
I assume you're logged on as an administrator?
 
Also, does your code work to remove other registry keys? Like, if you were to make a fake key and try to remove it, does it work? If not, perhaps those functions you're using just don't like you; in which case, you can use the API calls to do it.. you'd just need to import them into your VB program.


data/avatar/default/avatar05.webp

38 Posts
Location -
Joined 2004-07-31
OP
Yes, i tried a fake key and that was removable.
^^ i suggest that i use API Calls^^
 
Now what i dont know to use it or so....