.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal

Home >> Code Snippets >> Visual Studio >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Renaming Recyle Bin from VB.NET

Posted By:Hefin Dsouza       Posted Date: August 14, 2009    Points: 10    Category: Visual Studio    URL: http://www.dotnetspark.com  

This Code sample Will Help you to Rename Recyle Bin From an .net Application.

Note This is a VB.net Code Snippet

In this example, we use the windows registry and access the Recycle bin's keys in it. To re-name, just change the value of "Loacalized String"

Console.Write("Rename Recyle Bin to : ")
nname = Console.ReadLine()
Registry.ClassesRoot.OpenSubKey("CLSID\{645FF040-5081-101B-9F08-00AA002F954E}", True).SetValue("LocalizedString", nname)
Console.WriteLine("Recycle Bin Renamed Successfully !!" & vbNewLine & "Refresh Windows to See the Changes")
Console.Write("Press Any Key To Continue :}")


Hefin Dsouza


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend