Archive: DeleteRegValue problems...


DeleteRegValue problems...
I have a big problem, in Microsoft SQL Server, subkey i can delete subkeys no problem but i cannot delete a subkey value, with or with out the registry plugin. And yes i do have the permissions!




DeleteRegKey HKLM "Software\Microsoft\Microsoft SQL Server\$SqlFolder" ; works

DeleteRegValue HKLM "Software\Microsoft\Micrososft SQL Server\test" "r0" ;Does not work


${registry::DeleteValue} "HKEY_LOCAL_MACHINE\Software\Microsoft\Micrososft SQL Server\test" "r0" $Main_dir ;Does not work






Anybody has an idea?

Assuming you stored the name of the key in $0 you use this:

DeleteRegValue HKLM "Software\Microsoft\Micrososft SQL Server\test" "$0"
The use of r0 is typically a System plugin syntax.

I tried it and and it still does not want to delete the $%$%& value... Any other solutions?


Most probably the regvalue name is wrong. Do a MessageBox MB_OK "$0" before the delete command to verify what value $0 contains.


Ok, i have checked the value, i did that before i posted the last post. The main problem is in Microsoft SQL Server folder you can delete keys but can't delete values...Outside the folder everything works fine. So maybe somebody knows how to move a RegKey, so ican put it outside the folder delete the value and then get it back where it was. Or maybe somebody that has experience with this kind of problems ? By the way i did check the permissions! The funny part is, i can delete RegKeys !?!



thanks for your answers!


That's odd. Do you have RequestExecutionLevel admin?

Stu


Well he did say he had sufficient permission. But though I don't know much about registry permissions, I wouldn't be surprised if one could make it require more than just admin access. For files/directories for example, you can block even admins from accessing/deleting something. But as far as I know you can never prevent them from giving themselves access again. So perhaps you should grant yourself full access to the regkey before trying to delete the regvalue?


I tried the Full control for every User (might as well...), as for RequestExecution Level, i did not use it i'm on XP,but i tried it anyway....same $%^& different bucket! I was wondering how can i move a key, or copy a key ? Because i would copy it where i want it, delete it and then delete the specified value and move it or recopy it (the key) where it is suppose to be. That's the only thing i can see!


You can view registry key permissions in regedit...


I think i found out why in the Micrososft SQL Server (folder/Key) i found the same value, since i kind of messed up SQL server i deleted the value and the subkey deseapeared, they seem to be linked somehow..? (i'm not a big registry expert).So i just need to delete that value in the "main key" but it's a REG_MULTI_SZ value, and if there is more then one instance of SQL server they will show up in there, i just want to delete one of them. Do you know if the next line of code will do the trick?


DeleteRegValue HKLM "Software\Microsoft\Micrososft SQL Server" "$Thevalue"



P.S. If anyone can tell me how to link a value to a subkey value, that would be nice!

Thanks for the replies

Hi, if anybody has an issue like this, there may be an easy way out. Go check that other thread.


http://forums.winamp.com/showthread.php?t=328541



Thanks for your responses!