Use built in IsAdmin function

This commit is contained in:
Jaex 2024-02-27 17:39:20 +03:00
parent 4f1e2f0b42
commit adeb71462d
2 changed files with 1 additions and 6 deletions

View file

@ -63,7 +63,7 @@ public SingleInstanceManager(bool isSingleInstance, string[] args)
{ {
cts = new CancellationTokenSource(); cts = new CancellationTokenSource();
Task.Run(() => ListenForConnectionsAsync(), cts.Token); Task.Run(ListenForConnectionsAsync, cts.Token);
} }
else else
{ {

View file

@ -104,11 +104,6 @@ Root: "HKCU"; Subkey: "Control Panel\Keyboard"; ValueType: dword; ValueName: "Pr
#include "CodeDependencies.iss" #include "CodeDependencies.iss"
[Code] [Code]
function IsAdmin: Boolean;
begin
Result := (IsAdminLoggedOn or IsPowerUserLoggedOn);
end;
procedure InitializeWizard; procedure InitializeWizard;
begin begin
if not IsAdmin then if not IsAdmin then