Programmatically remove Public Folders under Windows 7 Libraries

Download Orinal source code from Microsoft

CSWin7ShellLibrary.exe

Modify Source to the following

class Program
{
    static void Main(string[] args)
    {
        string[] LibArray = new string[] { "Pictures", "Videos", "Documents", 
"Music"
}; foreach (string libraryName in LibArray) { using (ShellLibrary library = ShellLibrary.Load(libraryName, false)) { string folderPath = "C:\\Users\\Public\\" + libraryName; library.Remove(folderPath); } } } }

Compile and run the executable for each user at login.

Leave a comment

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux