Posts
337
Comments
125
Trackbacks
5
Kann man immer wieder mal gebrauchen

Ein kleines Konsolenprogramm welches die Verzeichnisse des lokalen Benutzers ausgibt:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text; 

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (Environment.SpecialFolder sp in Enum.GetValues(typeof(Environment.SpecialFolder)))
            {
                Console.WriteLine(sp.ToString());
                Console.WriteLine(Environment.GetFolderPath(sp));
                Console.WriteLine();
            }

            Console.ReadLine();
        }
    }
}

Die Ausgabe ist die folgende:

Desktop
C:\Users\admin\Desktop

Programs
C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

Personal
C:\Users\admin\Documents

Personal
C:\Users\admin\Documents

Favorites
C:\Users\admin\Favorites

Startup
C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

Recent
C:\Users\admin\AppData\Roaming\Microsoft\Windows\Recent

SendTo
C:\Users\admin\AppData\Roaming\Microsoft\Windows\SendTo

StartMenu
C:\Users\admin\AppData\Roaming\Microsoft\Windows\Start Menu

MyMusic
C:\Users\admin\Music

DesktopDirectory
C:\Users\admin\Desktop

MyComputer

Templates
C:\Users\admin\AppData\Roaming\Microsoft\Windows\Templates

ApplicationData
C:\Users\admin\AppData\Roaming

LocalApplicationData
C:\Users\admin\AppData\Local

InternetCache
C:\Users\admin\AppData\Local\Microsoft\Windows\Temporary Internet Files

Cookies
C:\Users\admin\AppData\Roaming\Microsoft\Windows\Cookies

History
C:\Users\admin\AppData\Local\Microsoft\Windows\History

CommonApplicationData
C:\ProgramData

System
C:\Windows\system32

ProgramFiles
C:\Program Files

MyPictures
C:\Users\admin\Pictures

CommonProgramFiles
C:\Program Files\Common Files

posted on Thursday, October 15, 2009 6:07 PM Print
Comments
Gravatar
# re: Kann man immer wieder mal gebrauchen
Crapstipps
2/13/2010 7:47 AM
CAT.NET is command line tool that helps you identify security flaws within a managed code (C#, Visual Basic .NET, J#) application you are developing. It does so by scanning the binary and/or assembly of the application, and tracing the data flow among its statements, methods, and assemblies. This includes indirect data types such as property assignments and instance tainting operations. The engine works by reading the target assembly and all reference assemblies used in the application.Code which you have given above I need some more explanation on it.

Post Comment

Title *
Name *
Email
Url
Comment *  
Please add 2 and 1 and type the answer here: