Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
87f88eeb
Commit
87f88eeb
authored
Oct 29, 2021
by
longpanda
Browse files
[Ventoy2Disk.exe] improve Windows edition reporting
parent
7b261574
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
90 additions
and
66 deletions
+90
-66
INSTALL/Ventoy2Disk.exe
INSTALL/Ventoy2Disk.exe
+0
-0
Ventoy2Disk/Ventoy2Disk/DiskService_vds.c
Ventoy2Disk/Ventoy2Disk/DiskService_vds.c
+3
-3
Ventoy2Disk/Ventoy2Disk/Utility.c
Ventoy2Disk/Ventoy2Disk/Utility.c
+87
-63
No files found.
INSTALL/Ventoy2Disk.exe
View file @
87f88eeb
No preview for this file type
Ventoy2Disk/Ventoy2Disk/DiskService_vds.c
View file @
87f88eeb
...
@@ -608,7 +608,7 @@ STATIC IVdsService * VDS_InitService(void)
...
@@ -608,7 +608,7 @@ STATIC IVdsService * VDS_InitService(void)
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
VDS_SET_ERROR
(
hr
);
VDS_SET_ERROR
(
hr
);
Log
(
"Could not create VDS Loader Instance:
%u
"
,
LASTERR
);
Log
(
"Could not create VDS Loader Instance:
0x%x
"
,
LASTERR
);
return
NULL
;
return
NULL
;
}
}
...
@@ -618,7 +618,7 @@ STATIC IVdsService * VDS_InitService(void)
...
@@ -618,7 +618,7 @@ STATIC IVdsService * VDS_InitService(void)
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
VDS_SET_ERROR
(
hr
);
VDS_SET_ERROR
(
hr
);
Log
(
"Could not load VDS Service:
%u
"
,
LASTERR
);
Log
(
"Could not load VDS Service:
0x%x
"
,
LASTERR
);
return
NULL
;
return
NULL
;
}
}
...
@@ -627,7 +627,7 @@ STATIC IVdsService * VDS_InitService(void)
...
@@ -627,7 +627,7 @@ STATIC IVdsService * VDS_InitService(void)
if
(
hr
!=
S_OK
)
if
(
hr
!=
S_OK
)
{
{
VDS_SET_ERROR
(
hr
);
VDS_SET_ERROR
(
hr
);
Log
(
"VDS Service is not ready:
%u
"
,
LASTERR
);
Log
(
"VDS Service is not ready:
0x%x
"
,
LASTERR
);
return
NULL
;
return
NULL
;
}
}
...
...
Ventoy2Disk/Ventoy2Disk/Utility.c
View file @
87f88eeb
...
@@ -267,69 +267,93 @@ static const char* GetEdition(DWORD ProductType)
...
@@ -267,69 +267,93 @@ static const char* GetEdition(DWORD ProductType)
// From: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo
// From: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo
// These values can be found in the winnt.h header.
// These values can be found in the winnt.h header.
switch
(
ProductType
)
{
switch
(
ProductType
)
{
case
0x00000000
:
return
""
;
// Undefined
case
0x00000000
:
return
""
;
// Undefined
case
0x00000001
:
return
"Ultimate"
;
case
0x00000001
:
return
"Ultimate"
;
case
0x00000002
:
return
"Home Basic"
;
case
0x00000002
:
return
"Home Basic"
;
case
0x00000003
:
return
"Home Premium"
;
case
0x00000003
:
return
"Home Premium"
;
case
0x00000004
:
return
"Enterprise"
;
case
0x00000004
:
return
"Enterprise"
;
case
0x00000005
:
return
"Home Basic N"
;
case
0x00000005
:
return
"Home Basic N"
;
case
0x00000006
:
return
"Business"
;
case
0x00000006
:
return
"Business"
;
case
0x00000007
:
return
"Standard Server"
;
case
0x00000007
:
return
"Server Standard"
;
case
0x00000008
:
return
"Datacenter Server"
;
case
0x00000008
:
return
"Server Datacenter"
;
case
0x00000009
:
return
"Smallbusiness Server"
;
case
0x00000009
:
return
"Smallbusiness Server"
;
case
0x0000000A
:
return
"Enterprise Server"
;
case
0x0000000A
:
return
"Server Enterprise"
;
case
0x0000000B
:
return
"Starter"
;
case
0x0000000B
:
return
"Starter"
;
case
0x00000010
:
return
"Business N"
;
case
0x0000000C
:
return
"Server Datacenter (Core)"
;
case
0x00000011
:
return
"Web Server"
;
case
0x0000000D
:
return
"Server Standard (Core)"
;
case
0x00000012
:
return
"Cluster Server"
;
case
0x0000000E
:
return
"Server Enterprise (Core)"
;
case
0x00000013
:
return
"Home Server"
;
case
0x00000010
:
return
"Business N"
;
case
0x0000001A
:
return
"Home Premium N"
;
case
0x00000011
:
return
"Web Server"
;
case
0x0000001B
:
return
"Enterprise N"
;
case
0x00000012
:
return
"HPC Edition"
;
case
0x0000001C
:
return
"Ultimate N"
;
case
0x00000013
:
return
"Storage Server (Essentials)"
;
case
0x00000022
:
return
"Home Premium Server"
;
case
0x0000001A
:
return
"Home Premium N"
;
case
0x0000002F
:
return
"Starter N"
;
case
0x0000001B
:
return
"Enterprise N"
;
case
0x00000030
:
return
"Pro"
;
case
0x0000001C
:
return
"Ultimate N"
;
case
0x00000031
:
return
"Pro N"
;
case
0x00000022
:
return
"Home Server"
;
case
0x00000042
:
return
"Starter E"
;
case
0x00000024
:
return
"Server Standard without Hyper-V"
;
case
0x00000043
:
return
"Home Basic E"
;
case
0x00000025
:
return
"Server Datacenter without Hyper-V"
;
case
0x00000044
:
return
"Premium E"
;
case
0x00000026
:
return
"Server Enterprise without Hyper-V"
;
case
0x00000045
:
return
"Pro E"
;
case
0x00000027
:
return
"Server Datacenter without Hyper-V (Core)"
;
case
0x00000046
:
return
"Enterprise E"
;
case
0x00000028
:
return
"Server Standard without Hyper-V (Core)"
;
case
0x00000047
:
return
"Ultimate E"
;
case
0x00000029
:
return
"Server Enterprise without Hyper-V (Core)"
;
case
0x00000048
:
return
"Enterprise Eval"
;
case
0x0000002A
:
return
"Hyper-V Server"
;
case
0x00000054
:
return
"Enterprise N Eval"
;
case
0x0000002F
:
return
"Starter N"
;
case
0x00000057
:
return
"Thin PC"
;
case
0x00000030
:
return
"Pro"
;
case
0x0000006F
:
return
"Core Connected"
;
case
0x00000031
:
return
"Pro N"
;
case
0x00000070
:
return
"Pro Student"
;
case
0x00000034
:
return
"Server Solutions Premium"
;
case
0x00000071
:
return
"Core Connected N"
;
case
0x00000035
:
return
"Server Solutions Premium (Core)"
;
case
0x00000072
:
return
"Pro Student N"
;
case
0x00000040
:
return
"Server Hyper Core V"
;
case
0x00000073
:
return
"Core Connected Single Language"
;
case
0x00000042
:
return
"Starter E"
;
case
0x00000074
:
return
"Core Connected China"
;
case
0x00000043
:
return
"Home Basic E"
;
case
0x00000079
:
return
"Edu"
;
case
0x00000044
:
return
"Premium E"
;
case
0x0000007A
:
return
"Edu N"
;
case
0x00000045
:
return
"Pro E"
;
case
0x0000007D
:
return
"Enterprise S"
;
case
0x00000046
:
return
"Enterprise E"
;
case
0x0000007E
:
return
"Enterprise S N"
;
case
0x00000047
:
return
"Ultimate E"
;
case
0x0000007F
:
return
"Pro S"
;
case
0x00000048
:
return
"Enterprise (Eval)"
;
case
0x00000080
:
return
"Pro S N"
;
case
0x0000004F
:
return
"Server Standard (Eval)"
;
case
0x00000081
:
return
"Enterprise S Eval"
;
case
0x00000050
:
return
"Server Datacenter (Eval)"
;
case
0x00000082
:
return
"Enterprise S N Eval"
;
case
0x00000054
:
return
"Enterprise N (Eval)"
;
case
0x0000008A
:
return
"Pro Single Language"
;
case
0x00000057
:
return
"Thin PC"
;
case
0x0000008B
:
return
"Pro China"
;
case
0x00000058
:
case
0x00000059
:
case
0x0000005A
:
case
0x0000005B
:
case
0x0000005C
:
return
"Embedded"
;
case
0x0000008C
:
return
"Enterprise Subscription"
;
case
0x00000062
:
return
"Home N"
;
case
0x0000008D
:
return
"Enterprise Subscription N"
;
case
0x00000063
:
return
"Home China"
;
case
0x00000095
:
return
"Utility VM"
;
case
0x00000064
:
return
"Home Single Language"
;
case
0x000000A1
:
return
"Pro Workstation"
;
case
0x00000065
:
return
"Home"
;
case
0x000000A2
:
return
"Pro Workstation N"
;
case
0x00000067
:
return
"Pro with Media Center"
;
case
0x000000A4
:
return
"Pro for Education"
;
case
0x00000069
:
case
0x0000006A
:
case
0x0000006B
:
case
0x0000006C
:
return
"Embedded"
;
case
0x000000A5
:
return
"Pro for Education N"
;
case
0x0000006F
:
return
"Home Connected"
;
case
0x000000AB
:
return
"Enterprise G"
;
// I swear Microsoft are just making up editions...
case
0x00000070
:
return
"Pro Student"
;
case
0x000000AC
:
return
"Enterprise G N"
;
case
0x00000071
:
return
"Home Connected N"
;
case
0x000000B6
:
return
"Core OS"
;
case
0x00000072
:
return
"Pro Student N"
;
case
0x000000B7
:
return
"Cloud E"
;
case
0x00000073
:
return
"Home Connected Single Language"
;
case
0x000000B8
:
return
"Cloud E N"
;
case
0x00000074
:
return
"Home Connected China"
;
case
0x000000BD
:
return
"Lite"
;
case
0x00000079
:
return
"Education"
;
case
0xABCDABCD
:
return
"(Unlicensed)"
;
case
0x0000007A
:
return
"Education N"
;
default:
return
"(Unknown Edition)"
;
case
0x0000007D
:
return
"Enterprise LTSB"
;
case
0x0000007E
:
return
"Enterprise LTSB N"
;
case
0x0000007F
:
return
"Pro S"
;
case
0x00000080
:
return
"Pro S N"
;
case
0x00000081
:
return
"Enterprise LTSB (Eval)"
;
case
0x00000082
:
return
"Enterprise LTSB N (Eval)"
;
case
0x0000008A
:
return
"Pro Single Language"
;
case
0x0000008B
:
return
"Pro China"
;
case
0x0000008C
:
return
"Enterprise Subscription"
;
case
0x0000008D
:
return
"Enterprise Subscription N"
;
case
0x00000091
:
return
"Server Datacenter SA (Core)"
;
case
0x00000092
:
return
"Server Standard SA (Core)"
;
case
0x00000095
:
return
"Utility VM"
;
case
0x000000A1
:
return
"Pro for Workstations"
;
case
0x000000A2
:
return
"Pro for Workstations N"
;
case
0x000000A4
:
return
"Pro for Education"
;
case
0x000000A5
:
return
"Pro for Education N"
;
case
0x000000AB
:
return
"Enterprise G"
;
// I swear Microsoft are just making up editions...
case
0x000000AC
:
return
"Enterprise G N"
;
case
0x000000B6
:
return
"Home OS"
;
case
0x000000B7
:
return
"Cloud E"
;
case
0x000000B8
:
return
"Cloud E N"
;
case
0x000000BD
:
return
"Lite"
;
case
0xABCDABCD
:
return
"(Unlicensed)"
;
default:
return
"(Unknown Edition)"
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment