Skip to content

Commit 490c1eb

Browse files
committed
#44: force EXE to always run as administrator
1 parent 5a79dc5 commit 490c1eb

5 files changed

Lines changed: 52 additions & 44 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ jobs:
2020

2121
steps:
2222
- name: Clone
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424

2525
- name: Restore
26-
run: dotnet restore --locked-mode
26+
run: dotnet restore --runtime ${{ matrix.targetPlatform }} --locked-mode
2727

2828
- name: Build
2929
run: dotnet build ${{ env.ProjectName }} --no-restore --runtime ${{ matrix.targetPlatform }} --configuration Release --no-self-contained
@@ -32,7 +32,7 @@ jobs:
3232
run: dotnet publish ${{ env.ProjectName }} --no-build --runtime ${{ matrix.targetPlatform }} --configuration Release --no-self-contained -p:PublishSingleFile=true
3333

3434
- name: Upload build artifacts
35-
uses: actions/upload-artifact@v4
35+
uses: actions/upload-artifact@v7
3636
with:
3737
name: ${{ env.ProjectName }}-${{ matrix.targetPlatform }}
3838
path: ${{ env.ProjectName }}/bin/Release/net8.0-windows/${{ matrix.targetPlatform }}/publish/*.exe

AuthenticatorChooser/AuthenticatorChooser.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828
</ItemGroup>
2929

3030
<ItemGroup>
31-
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="5.0.1" />
32-
<PackageReference Include="mwinapi" Version="0.3.0.5" />
33-
<PackageReference Include="NLog" Version="6.1.1" />
34-
<PackageReference Include="System.Management" Version="10.0.3" />
31+
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="5.1.0" />
32+
<PackageReference Include="mwinapi" Version="0.3.0.6" />
33+
<PackageReference Include="NLog" Version="6.1.2" />
34+
<PackageReference Include="System.Management" Version="10.0.5" />
3535
<PackageReference Include="TaskScheduler" Version="2.12.2" />
36-
<PackageReference Include="ThrottleDebounce" Version="3.0.0-beta5" />
37-
<PackageReference Include="Unfucked.Windows" Version="0.0.1-beta.6" />
36+
<PackageReference Include="ThrottleDebounce" Version="3.0.0-beta6" />
37+
<PackageReference Include="Unfucked.Windows" Version="0.0.1-beta.9" />
3838
<PackageReference Include="Workshell.PE.Resources" Version="4.0.0.147" />
3939
</ItemGroup>
4040

AuthenticatorChooser/Startup.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private bool registerAsStartupProgram() {
147147
TaskService.Instance.RootFolder.RegisterTaskDefinition($"{PROGRAM_NAME} \u2013 {Environment.UserName}", scheduledTask, TaskCreation.CreateOrUpdate, domainAndUsername, null,
148148
TaskLogonType.InteractiveToken);
149149

150-
// #44: Remove the old 0.4.0 registry startup entry, which is no longer adequate. This removal avoid both starting twice and showing a UAC prompt on each login.
150+
// #44: Remove the old 0.4.0 registry startup entry, which is no longer adequate. This removal avoids both starting twice and showing a UAC prompt on each login.
151151
using RegistryKey? userRun = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run", true);
152152
if (userRun is not null) {
153153
try {

AuthenticatorChooser/app.manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
55
<security>
66
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
7-
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
7+
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
88
</requestedPrivileges>
99
</security>
1010
</trustInfo>

AuthenticatorChooser/packages.lock.json

Lines changed: 41 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@
44
"net8.0-windows7.0": {
55
"McMaster.Extensions.CommandLineUtils": {
66
"type": "Direct",
7-
"requested": "[5.0.1, )",
8-
"resolved": "5.0.1",
9-
"contentHash": "dXerCHdnTrlpoQjdpxBISv9OIqqziJph1bKOTK95nPG0m7yDyMyVmQDcE1Z10ZZlQeaod1C8zewOW+MQOgPWhw=="
7+
"requested": "[5.1.0, )",
8+
"resolved": "5.1.0",
9+
"contentHash": "YceiKmxdsBrlkAJpmJ2N8XkLyAH01xLsm4VLfjNp5MvtAom2wflZtEBz3CLMQret6Z7jSh3oBO1ULF1Is0tNxA=="
1010
},
1111
"mwinapi": {
1212
"type": "Direct",
13-
"requested": "[0.3.0.5, )",
14-
"resolved": "0.3.0.5",
15-
"contentHash": "jb1ox29TMcxe0klNF5yui+ehXHUdEZOuykYaoGI9Okt0s7K5bNWxOzqsng0VVVvvFnW9wNfS4hWYOsE9Xup0GQ==",
13+
"requested": "[0.3.0.6, )",
14+
"resolved": "0.3.0.6",
15+
"contentHash": "ifbh/zHTsN+hrT2kBE4he8+Bq9DS/9b8tA0aVIdJCOK3Y4O0hdFtZSiQHpJX1YkH4/JMmF0V5hHQDahS5i9U1g==",
1616
"dependencies": {
1717
"System.Management": "6.0.0"
1818
}
1919
},
2020
"NLog": {
2121
"type": "Direct",
22-
"requested": "[6.1.1, )",
23-
"resolved": "6.1.1",
24-
"contentHash": "TCIwfAQX2IpZDnqs/+c5jCPnveCG8M6/wFmUk2odjRl0xiocfe4B+4qIvRbVbazSxcS28+Zu14pFeRJE9yAQAQ=="
22+
"requested": "[6.1.2, )",
23+
"resolved": "6.1.2",
24+
"contentHash": "y/3o6RVhHHeAMDaUdETeEtisYyypZApxeKd3k8HIH4IdqFzJNF5sXuJ07hNtAq6hLMup+yh3zuTckpFJqucOrw=="
2525
},
2626
"System.Management": {
2727
"type": "Direct",
28-
"requested": "[10.0.3, )",
29-
"resolved": "10.0.3",
30-
"contentHash": "VyK/nnG1ZgwP/wY8HGrNrdha7kenyI+bkfE0miywiRaWVwqtenuYshA6pmP6Xm7lPsTE2ZRZ+BkzmUVg/VZtTg==",
28+
"requested": "[10.0.5, )",
29+
"resolved": "10.0.5",
30+
"contentHash": "JhBVxvWhUJ0KAquUK0dMnc3a1Ol4JyH8fMrMQZ9GgEUkrtvPy8DE57SDnGnuvOdI0maJOdguxw87N5bh2eL87A==",
3131
"dependencies": {
32-
"System.CodeDom": "10.0.3"
32+
"System.CodeDom": "10.0.5"
3333
}
3434
},
3535
"TaskScheduler": {
@@ -45,19 +45,22 @@
4545
},
4646
"ThrottleDebounce": {
4747
"type": "Direct",
48-
"requested": "[3.0.0-beta5, )",
49-
"resolved": "3.0.0-beta5",
50-
"contentHash": "hvmR5CBGzzRAO+jJBkZuPUfXeChZRR9X2vfVLYEo7CffFV2oz4yuX9sj80GqH6oxj5KYXodJ+oGaYOtIE+H5tw=="
48+
"requested": "[3.0.0-beta6, )",
49+
"resolved": "3.0.0-beta6",
50+
"contentHash": "hLr071LwvbfwNvjsnEb5FP7BNnmu4qG6++ZHAdVEaLCv01BQ9m3G1PLKv/C8DPJ9hFcs+3EUNh+c9/Lg459HIw==",
51+
"dependencies": {
52+
"Microsoft.CSharp": "4.7.0"
53+
}
5154
},
5255
"Unfucked.Windows": {
5356
"type": "Direct",
54-
"requested": "[0.0.1-beta.6, )",
55-
"resolved": "0.0.1-beta.6",
56-
"contentHash": "i2ZTvgSm5ARCwbXQ9vyX0L+JK8t/DfjXwdytp2DxbNi+ztHg6XX/qo+8RLa0zWc+/K3lVNsySSexovfk82/k1g==",
57+
"requested": "[0.0.1-beta.9, )",
58+
"resolved": "0.0.1-beta.9",
59+
"contentHash": "MIIM4MzKMgasq3emyh36F5kAynuQ2p4AKzf740f/DF8YsLNOV/WvImfK4zz2tBErZ563RxDzAq87uYqgDRgTGA==",
5760
"dependencies": {
5861
"ThrottleDebounce": "3.0.0-beta5",
59-
"Unfucked": "0.0.1-beta.20",
60-
"mwinapi": "0.3.0.5"
62+
"Unfucked": "0.0.1-beta.38",
63+
"mwinapi": "0.3.0.6"
6164
}
6265
},
6366
"Workshell.PE.Resources": {
@@ -70,6 +73,11 @@
7073
"Workshell.PE": "4.0.0.147"
7174
}
7275
},
76+
"Microsoft.CSharp": {
77+
"type": "Transitive",
78+
"resolved": "4.7.0",
79+
"contentHash": "pTj+D3uJWyN3My70i2Hqo+OXixq3Os2D1nJ2x92FFo6sk8fYS1m1WLNTs0Dc1uPaViH0YvEEwvzddQ7y4rhXmA=="
80+
},
7381
"Microsoft.Win32.Registry": {
7482
"type": "Transitive",
7583
"resolved": "5.0.0",
@@ -86,8 +94,8 @@
8694
},
8795
"System.CodeDom": {
8896
"type": "Transitive",
89-
"resolved": "10.0.3",
90-
"contentHash": "+G1mBhHJp8taiDcHK1gmckOZ884n9JeIrS1dzFYZhSa8oTiIF+EagIyAyCOQzdBbbES7eb9AkjGBlUZqqoCaeg=="
97+
"resolved": "10.0.5",
98+
"contentHash": "hGZWDDJh1U6t7fy3iO4HlZYK1ur1fWE3sTqTNHkHk0Leh0JUcxYM//JtLBNG5g+6D2Lt0+aHH8rc7e5oIlNgCg=="
9199
},
92100
"System.Diagnostics.EventLog": {
93101
"type": "Transitive",
@@ -114,8 +122,8 @@
114122
},
115123
"Unfucked": {
116124
"type": "Transitive",
117-
"resolved": "0.0.1-beta.20",
118-
"contentHash": "ZTjPP+8LizYyxTUYrZMcvYX9KPMnsHQu70epBvT7Ka3Egn1VHvm6vF9bsVLxzqArBhGpBifIL6quIz4Mp3GXnA=="
125+
"resolved": "0.0.1-beta.38",
126+
"contentHash": "kubqp2LfAyeKSwsLbq+qXPssbGNUzjVICfDqbPf9LgO50a/TM8KfQnxBxkZo8YoUksII0avp1NJAZoosChGk9w=="
119127
},
120128
"Workshell.PE": {
121129
"type": "Transitive",
@@ -126,11 +134,11 @@
126134
"net8.0-windows7.0/win-arm64": {
127135
"System.Management": {
128136
"type": "Direct",
129-
"requested": "[10.0.3, )",
130-
"resolved": "10.0.3",
131-
"contentHash": "VyK/nnG1ZgwP/wY8HGrNrdha7kenyI+bkfE0miywiRaWVwqtenuYshA6pmP6Xm7lPsTE2ZRZ+BkzmUVg/VZtTg==",
137+
"requested": "[10.0.5, )",
138+
"resolved": "10.0.5",
139+
"contentHash": "JhBVxvWhUJ0KAquUK0dMnc3a1Ol4JyH8fMrMQZ9GgEUkrtvPy8DE57SDnGnuvOdI0maJOdguxw87N5bh2eL87A==",
132140
"dependencies": {
133-
"System.CodeDom": "10.0.3"
141+
"System.CodeDom": "10.0.5"
134142
}
135143
},
136144
"Microsoft.Win32.Registry": {
@@ -174,11 +182,11 @@
174182
"net8.0-windows7.0/win-x64": {
175183
"System.Management": {
176184
"type": "Direct",
177-
"requested": "[10.0.3, )",
178-
"resolved": "10.0.3",
179-
"contentHash": "VyK/nnG1ZgwP/wY8HGrNrdha7kenyI+bkfE0miywiRaWVwqtenuYshA6pmP6Xm7lPsTE2ZRZ+BkzmUVg/VZtTg==",
185+
"requested": "[10.0.5, )",
186+
"resolved": "10.0.5",
187+
"contentHash": "JhBVxvWhUJ0KAquUK0dMnc3a1Ol4JyH8fMrMQZ9GgEUkrtvPy8DE57SDnGnuvOdI0maJOdguxw87N5bh2eL87A==",
180188
"dependencies": {
181-
"System.CodeDom": "10.0.3"
189+
"System.CodeDom": "10.0.5"
182190
}
183191
},
184192
"Microsoft.Win32.Registry": {

0 commit comments

Comments
 (0)