Link to home
Start Free TrialLog in
Avatar of ankur3020
ankur3020

asked on

change default value of registry

how to change value of default registry key.

i.e. suppose u open registry hkey_classes_root/qyplayer/default

now i want to change value of this default key created wtih qtplayer.

pls provide vbs code.
SOLUTION
Avatar of Hubasan
Hubasan
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ankur3020
ankur3020

ASKER

i am using following code, but nothing happened. pls check . the default key is already existing and i want to change value of this default key.

in the following code there is a default key and it has some value {....} and i want to change that value with 0.

pls guide
Set oWS = CreateObject("wscript.shell")
 
sKeyPath = "AllFilesystemObjects\shellex\ContextMenuHandlers\Send To"
 
oWS.RegWrite "HKEY_CLASSES_ROOT\" & sKeyPath, 0, "REG_SZ"

Open in new window

ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i used ur code but no results. the code i used is attached.pls guide.
Set oWS = CreateObject("wscript.shell")
 
sKeyPath = "AllFilesystemObjects\shellex\ContextMenuHandlers\Send To\"
 
oWS.RegWrite "HKCR\" & sKeyPath, 0, "REG_SZ"

Open in new window

Hi ankur3020,

The code I posted has been tested and it works as expected. I just re-tested it again.

The script will overwrite the Default value's data from "{7BA4C740-9E81-11CF-99D3-00AA004AE837}" ( this is on Windows XP SP2) to value data "0", which effectively removes the Send To right-click context menu from your PC.

What exactly are you trying to do and what do you mean when you say "no results".
Give me as much details as possible about what are you trying to do and maybe I can help you.
yes r u right, it worked now. thanks dear.
thanks for ur guidance.
You are welcome :-)