• Home
  • Organisasi
  • Tentang Delft
  • FAQ
PPI Delft
Perhimpunan Pelajar Indonesia Delft
  • Categories

    • Aktifitas PPI (42)
    • Artikel (11)
    • Event (11)
    • Informasi (69)
    • Jalan-jalan Yuk (4)
    • KOPI Delft (27)
    • Mak Nyuss (2)
    • Resep Nenek (5)
    • Secangkir Kopi (3)
    • Umum (20)
    • Uncategorized (3)
  • Archives

    • March 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • March 2008
    • February 2008
    • December 2007
    • November 2007
    • October 2007
    • September 2007
    • August 2007
    • July 2007
    • April 2007
  • Links

    • Log in
    • PPI Maastricht
    • PPI Den Haag
    • PPI Amsterdam
    • PPI Wageningen
    • PPI Groningen
    • PPI Belanda
    • Jadwal Transportasi Pesawat (Schiphol)
    • Simulasi Mesin Tiket Kereta
    • Panduan perjalanan di Belanda (www.9292ov.nl)
    • Transportasi Kereta NS (www.ns.nl)
    • Website TU Delft
    • Perpustakaan TU Delft
    • Website Unesco-IHE
    • InHolland Delft
    • Kota Delft
    • NESO
    • KBRI Belanda
    • Nuffic
    • ISSM 2008

  • Designed by:
    Wordpress themes

Apr 30

Creating a Restore Point Using Windows Management Instrumentation (WMI) and C#.NET

Artikel Tidak ada komentar »

oleh: HabsQ (publikasi ulang dari http://habsq.blogspot.com)

I have tried to find a way to create a restore point in Windows, but no matter how hard I tried, I just can’t find the one using C#, one of my favourite language. Sigh, I have to make one on my own :P Windows has something called WMI (Windows Management Instrumentation). It contains a huge classes and objects that allow programmers to do a lot of things, creating a restore point is just one of them.
Here is the source code to create a restore point in Windows:

ManagementScope oScope = new ManagementScope(”\\\\localhost\\root\\default”);
ManagementPath oPath = new ManagementPath(”SystemRestore”);
ObjectGetOptions oGetOp = new ObjectGetOptions();
ManagementClass oProcess = new ManagementClass(oScope,oPath,oGetOp);

ManagementBaseObject oInParams = oProcess.GetMethodParameters(”CreateRestorePoint”);
oInParams["Description"] = “My Restore Point”;
oInParams["RestorePointType"] = 0;
oInParams["EventType"] = 100;

ManagementBaseObject oOutParams = oProcess.InvokeMethod(”CreateRestorePoint”, oInParams, null);

Hope this will be useful. Don’t forget to add System.Management as a reference!

Powered by WordPress .::. Designed by SiteGround Web Hosting .::. Customized by Divisi Website PPI Delft

cssandhtml