8 Nisan 2015 Çarşamba

Windows belirli bir tarihten eski dosyaları silme

forfiles -p "C:\tmp" -s -m *.* -d -5 -c "cmd /c del @file"

c:\tmp dizinindeki 5 günden eski dosyaları siler

6 Mart 2015 Cuma

Windows Service Debug

static class Program
{
    static void Main()
    {
        #if(!DEBUG)
           ServiceBase[] ServicesToRun;
           ServicesToRun = new ServiceBase[] 
    { 
         new MyService() 
    };
           ServiceBase.Run(ServicesToRun);
         #else
           MyService myServ = new MyService();
           myServ.Process();
           // here Process is my Service function
           // that will run when my service onstart is call
           // you need to call your own method or function name here instead of Process();
         #endif
    }
}