Jump to content
Compatible Support Forums
Sign in to follow this  
Andicioz

Visual Basic 6.0 - Permission Denied - Runtime error 70

Recommended Posts

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

Share this post


Link to post

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...?

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

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....

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×