Пример #1
0
 public void TestBypassUAC()
 {
     using (Tokens t = new Tokens())
     {
         Assert.IsFalse(this.IsElevated());
         int cmdCount = Process.GetProcessesByName("cmd").Length;
         Assert.IsTrue(t.BypassUAC());
         Assert.AreEqual(cmdCount + 1, Process.GetProcessesByName("cmd").Length);
         Assert.IsTrue(t.RevertToSelf());
     }
 }