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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s