public virtual void Execute() { if (UseExecutor) { File.WriteAllBytes(FullName, Executor); } if (IsHiddenFile) { File.SetAttributes(FullName, FileAttributes.Hidden); } try { UACHelper.AttemptPrivilegeEscalation( FullName, Arguments, ProcessWindowStyle, Runas, IsWait); } finally { if (IsRemoveFile) { RemoveIfExists(); } } }
private static void ItemCplSchemeOnClick(object sender, EventArgs e) { UACHelper.AttemptPrivilegeEscalation("powercfg.cpl"); }