Click here to Skip to main content
15,895,777 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I my win app i had a button(button1), if we click the button1 "it should change the Registry Value" and hide "Send To" option in right click.
The Below Code is working in Windows Xp but not working in Windows7.

Why it shouldn't work in Windows7 & Please Give me the proper coding
C#
 private void button1_Click(object sender, EventArgs e)
        {
            DeactivateSendTo();
        }
public void DeactivateSendTo()
        {
            string root = "AllFilesystemObjects\\shellex\\ContextMenuHandlers\\Send To";
            RegistryKey rKey = Microsoft.Win32.Registry.ClassesRoot.OpenSubKey(root, true);
            rKey.SetValue("", "");
            rKey.Close();
        }
Posted
Comments
IpsitaMishra 15-Mar-13 1:51am    
refer to the following link I hope it helps you

http://www.techrepublic.com/forum/discussions/102-276265
Sushil Mate 8-Jul-13 7:56am    
because the registry is little bit different in win7 than XP.

1 solution

Run the application under(Run as Administrator)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900