Skip to content

Commit ccd7132

Browse files
authored
Add OS version check
If AzureSignTool is run on a version of Windows older than 10, it will fail saying `SignerSignEx3` can't be found. This gives a friendlier error message.
1 parent f94551f commit ccd7132

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/AzureSignTool/Program.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ public static Task<int> Main(string[] args)
3030
return Task.FromResult(E_PLATFORMNOTSUPPORTED);
3131
}
3232

33+
if (!OperatingSystem.IsWindowsVersionAtLeast(10))
34+
{
35+
Console.Error.WriteLine("Azure Sign Tool requires Windows 10 or later.");
36+
return Task.FromResult(E_PLATFORMNOTSUPPORTED);
37+
}
38+
3339
var app = new CommandApp("azuresigntool")
3440
{
3541
new VersionOption(version: GetVersion(), prototype: "version"),

0 commit comments

Comments
 (0)