diff options
Diffstat (limited to 'src/Cedar/IPsec_Win7.c')
-rw-r--r-- | src/Cedar/IPsec_Win7.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/src/Cedar/IPsec_Win7.c b/src/Cedar/IPsec_Win7.c index e5e4ad49..795e152c 100644 --- a/src/Cedar/IPsec_Win7.c +++ b/src/Cedar/IPsec_Win7.c @@ -367,10 +367,19 @@ bool IPsecWin7InitDriverInner() if (install_driver)
{
- char *src_filename = IPSEC_WIN7_SRC_SYS_X86;
- if (MsIsX64())
+ char src_filename[MAX_PATH];
+
+ if (MsIsWindows10() == false)
+ {
+ Format(src_filename, sizeof(src_filename),
+ "|DriverPackages\\Wfp\\%s\\pxwfp_%s.sys",
+ (MsIsX64() ? "x64" : "x86"), (MsIsX64() ? "x64" : "x86"));
+ }
+ else
{
- src_filename = IPSEC_WIN7_SRC_SYS_X64;
+ Format(src_filename, sizeof(src_filename),
+ "|DriverPackages\\Wfp_Win10\\%s\\pxwfp_%s.sys",
+ (MsIsX64() ? "x64" : "x86"), (MsIsX64() ? "x64" : "x86"));
}
// Copy the driver
@@ -467,13 +476,16 @@ bool IPsecWin7InitDriverInner() // Write the build number of the current driver
void SetCurrentIPsecWin7DriverBuild()
{
- MsRegWriteInt(REG_LOCAL_MACHINE, IPSEC_WIN7_DRIVER_REGKEY, IPSEC_WIN7_DRIVER_BUILDNUMBER, CEDAR_BUILD);
+ MsRegWriteInt(REG_LOCAL_MACHINE, IPSEC_WIN7_DRIVER_REGKEY,
+ (MsIsWindows10() ? IPSEC_WIN7_DRIVER_BUILDNUMBER_WIN10 : IPSEC_WIN7_DRIVER_BUILDNUMBER),
+ CEDAR_BUILD);
}
// Get the build number of the current driver
UINT GetCurrentIPsecWin7DriverBuild()
{
- return MsRegReadInt(REG_LOCAL_MACHINE, IPSEC_WIN7_DRIVER_REGKEY, IPSEC_WIN7_DRIVER_BUILDNUMBER);
+ return MsRegReadInt(REG_LOCAL_MACHINE, IPSEC_WIN7_DRIVER_REGKEY,
+ (MsIsWindows10() ? IPSEC_WIN7_DRIVER_BUILDNUMBER_WIN10 : IPSEC_WIN7_DRIVER_BUILDNUMBER));
}
// Initialization of the API
|