From 2c4fe3d1fa1f5108c05bb213f89e1971e36ee378 Mon Sep 17 00:00:00 2001 From: "Clemens A. Schulz" Date: Thu, 2 Oct 2014 06:20:02 +0200 Subject: [PATCH 1/5] Fixed Dokan installer in order to install also on Win8, Win8.1, Win2012, Win2012R2 --- dokan_install/install.nsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dokan_install/install.nsi b/dokan_install/install.nsi index 3e60f41..679d732 100644 --- a/dokan_install/install.nsi +++ b/dokan_install/install.nsi @@ -216,6 +216,12 @@ Function .onInit ${ElseIf} ${IsWin2008} ${ElseIf} ${IsWin2008R2} ${ElseIf} ${IsWin7} + ; For Win8 and Server2012 release tests we need to include this WinVer.sh version from NSIS 3.0a2 + ; http://sourceforge.net/p/nsis/code/HEAD/tree/NSIS/trunk/Include/WinVer.nsh + ${ElseIf} ${IsWin8} + ${ElseIf} ${IsWin2012} + ${ElseIf} ${IsWin8.1} + ${ElseIf} ${IsWin2012R2} ${Else} MessageBox MB_OK "Your OS is not supported. Dokan library supports Windows 2003, Vista, 2008, 2008R2 and 7 for x64." Abort @@ -226,6 +232,12 @@ Function .onInit ${ElseIf} ${IsWinVista} ${ElseIf} ${IsWin2008} ${ElseIf} ${IsWin7} + ; For Win8 and Server2012 release tests we need to include this WinVer.sh version from NSIS 3.0a2 + ; http://sourceforge.net/p/nsis/code/HEAD/tree/NSIS/trunk/Include/WinVer.nsh + ${ElseIf} ${IsWin8} + ${ElseIf} ${IsWin2012} + ${ElseIf} ${IsWin8.1} + ${ElseIf} ${IsWin2012R2} ${Else} MessageBox MB_OK "Your OS is not supported. Dokan library supports Windows XP, 2003, Vista, 2008 and 7 for x86." Abort From a7a8b5843a6a8650808c8ac52fcf75d20e2696f2 Mon Sep 17 00:00:00 2001 From: Clemens Alexander Schulz Date: Wed, 22 Oct 2014 14:49:05 +0200 Subject: [PATCH 2/5] - Added fix for bluescreen bugs in Dokan --- sys/create.c | 4 ++-- sys/init.c | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/create.c b/sys/create.c index 63038f6..5278237 100644 --- a/sys/create.c +++ b/sys/create.c @@ -149,10 +149,10 @@ DokanGetFCB( ExFreePool(FileName); } + InterlockedIncrement(&fcb->FileCount); ExReleaseResourceLite(&Vcb->Resource); KeLeaveCriticalRegion(); - InterlockedIncrement(&fcb->FileCount); return fcb; } @@ -173,7 +173,7 @@ DokanFreeFCB( ExAcquireResourceExclusiveLite(&vcb->Resource, TRUE); ExAcquireResourceExclusiveLite(&Fcb->Resource, TRUE); - Fcb->FileCount--; + InterlockedDecrement(&Fcb->FileCount); if (Fcb->FileCount == 0) { diff --git a/sys/init.c b/sys/init.c index d3c6ff3..20f38dd 100644 --- a/sys/init.c +++ b/sys/init.c @@ -25,6 +25,7 @@ with this program. If not, see . #include #include +static UNICODE_STRING sddl = RTL_CONSTANT_STRING(L"D:P(A;;GA;;;SY)(A;;GRGWGX;;;BA)(A;;GRGWGX;;;WD)(A;;GRGX;;;RC)"); NTSTATUS DokanSendIoContlToMountManager( @@ -292,7 +293,7 @@ DokanCreateGlobalDiskDevice( FILE_DEVICE_UNKNOWN,// DeviceType 0, // DeviceCharacteristics FALSE, // Not Exclusive - &SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RW_RES_R, // Default SDDL String + &SDDL_DEVOBJ_SYS_ALL_ADM_RWX_WORLD_RW_RES_R, // Edited SDDL string NULL, // Device Class GUID &deviceObject); // DeviceObject From c7964ef5e1245e139b50860ae0fab058d6af05d4 Mon Sep 17 00:00:00 2001 From: Clemens Alexander Schulz Date: Wed, 22 Oct 2014 14:49:32 +0200 Subject: [PATCH 3/5] - Added build scripts for all supported operating systems --- build_dokan_win7_x64.bat | 5 +++++ build_dokan_win7_x86.bat | 13 +++++++++++++ build_dokan_wlh_x64.bat | 5 +++++ build_dokan_wlh_x86.bat | 13 +++++++++++++ build_dokan_wnet_x64.bat | 5 +++++ build_dokan_wnet_x86.bat | 13 +++++++++++++ build_dokan_wxp_x86.bat | 13 +++++++++++++ 7 files changed, 67 insertions(+) create mode 100644 build_dokan_win7_x64.bat create mode 100644 build_dokan_win7_x86.bat create mode 100644 build_dokan_wlh_x64.bat create mode 100644 build_dokan_wlh_x86.bat create mode 100644 build_dokan_wnet_x64.bat create mode 100644 build_dokan_wnet_x86.bat create mode 100644 build_dokan_wxp_x86.bat diff --git a/build_dokan_win7_x64.bat b/build_dokan_win7_x64.bat new file mode 100644 index 0000000..9c8bc37 --- /dev/null +++ b/build_dokan_win7_x64.bat @@ -0,0 +1,5 @@ +set DOKAN_SRC_PATH=%cd% +call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ chk x64 WIN7 +cd %DOKAN_SRC_PATH% +cd sys +build /wcbg \ No newline at end of file diff --git a/build_dokan_win7_x86.bat b/build_dokan_win7_x86.bat new file mode 100644 index 0000000..a7cccf3 --- /dev/null +++ b/build_dokan_win7_x86.bat @@ -0,0 +1,13 @@ +set DOKAN_SRC_PATH=%cd% +call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ chk x86 WIN7 +cd %DOKAN_SRC_PATH% +cd dokan +build /wcbg +cd ..\dokan_control +build /wcbg +cd ..\dokan_mirror +build /wcbg +cd ..\dokan_mount +build /wcbg +cd ..\sys +build /wcbg \ No newline at end of file diff --git a/build_dokan_wlh_x64.bat b/build_dokan_wlh_x64.bat new file mode 100644 index 0000000..a05a2c8 --- /dev/null +++ b/build_dokan_wlh_x64.bat @@ -0,0 +1,5 @@ +set DOKAN_SRC_PATH=%cd% +call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ chk x64 WLH +cd %DOKAN_SRC_PATH% +cd sys +build /wcbg \ No newline at end of file diff --git a/build_dokan_wlh_x86.bat b/build_dokan_wlh_x86.bat new file mode 100644 index 0000000..e256431 --- /dev/null +++ b/build_dokan_wlh_x86.bat @@ -0,0 +1,13 @@ +set DOKAN_SRC_PATH=%cd% +call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ chk x86 WLH +cd %DOKAN_SRC_PATH% +cd dokan +build /wcbg +cd ..\dokan_control +build /wcbg +cd ..\dokan_mirror +build /wcbg +cd ..\dokan_mount +build /wcbg +cd ..\sys +build /wcbg \ No newline at end of file diff --git a/build_dokan_wnet_x64.bat b/build_dokan_wnet_x64.bat new file mode 100644 index 0000000..ad987e0 --- /dev/null +++ b/build_dokan_wnet_x64.bat @@ -0,0 +1,5 @@ +set DOKAN_SRC_PATH=%cd% +call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ chk x64 WNET +cd %DOKAN_SRC_PATH% +cd sys +build /wcbg \ No newline at end of file diff --git a/build_dokan_wnet_x86.bat b/build_dokan_wnet_x86.bat new file mode 100644 index 0000000..640b94b --- /dev/null +++ b/build_dokan_wnet_x86.bat @@ -0,0 +1,13 @@ +set DOKAN_SRC_PATH=%cd% +call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ chk x86 WNET +cd %DOKAN_SRC_PATH% +cd dokan +build /wcbg +cd ..\dokan_control +build /wcbg +cd ..\dokan_mirror +build /wcbg +cd ..\dokan_mount +build /wcbg +cd ..\sys +build /wcbg \ No newline at end of file diff --git a/build_dokan_wxp_x86.bat b/build_dokan_wxp_x86.bat new file mode 100644 index 0000000..bdbadef --- /dev/null +++ b/build_dokan_wxp_x86.bat @@ -0,0 +1,13 @@ +set DOKAN_SRC_PATH=%cd% +call C:\WinDDK\7600.16385.1\bin\setenv.bat C:\WinDDK\7600.16385.1\ chk x86 WXP +cd %DOKAN_SRC_PATH% +cd dokan +build /wcbg +cd ..\dokan_control +build /wcbg +cd ..\dokan_mirror +build /wcbg +cd ..\dokan_mount +build /wcbg +cd ..\sys +build /wcbg \ No newline at end of file From ebebb71e83bf115d21ed55b3c541d7041540ccf6 Mon Sep 17 00:00:00 2001 From: Clemens Alexander Schulz Date: Wed, 22 Oct 2014 14:50:07 +0200 Subject: [PATCH 4/5] - Modified installer in order to run also on Windows 8/8.1/2012/2012R2 --- dokan_install/install.nsi | 281 ++++++++++++++++++++++++++++++++------ 1 file changed, 242 insertions(+), 39 deletions(-) diff --git a/dokan_install/install.nsi b/dokan_install/install.nsi index 679d732..debdaf6 100644 --- a/dokan_install/install.nsi +++ b/dokan_install/install.nsi @@ -1,4 +1,4 @@ -!define VERSION "0.6.0" +!define VERSION "0.6.1" !include LogicLib.nsh !include x64.nsh @@ -19,6 +19,175 @@ Page instfiles UninstPage uninstConfirm UninstPage instfiles +; GetWindowsVersion 4.0 (2014-08-25) +; +; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ +; Update by Joost Verburg +; Update (Macro, Define, Windows 7 detection) - John T. Haller of PortableApps.com - 2008-01-07 +; Update (Windows 8 detection) - Marek Mizanin (Zanir) - 2013-02-07 +; Update (Windows 8.1 detection) - John T. Haller of PortableApps.com - 2014-04-04 +; Update (Windows 2008, 2008R2, 2012 and 2012R2 detection) - Francisco SimoƵes Filho franksimoes@gmail.com - 2014-08-25 +; +; Usage: ${GetWindowsVersion} $R0 +; +; $R0 contains: 95, 98, ME, NT x.x, 2000, XP, 2003, Vista, 2008, 7, 2008R2, +; 8, 2012, 8.1, 2012R2 or '' (for unknown) +Function GetWindowsVersion + + Push $R0 + Push $R1 + + ClearErrors + + ;--Key check if Windows is Client ou Server. + ReadRegStr $R2 HKLM \ + "SOFTWARE\Microsoft\Windows NT\CurrentVersion" InstallationType + + ; windows NT family + ReadRegStr $R0 HKLM \ + "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion + StrCmp $R0 "" lbl_not_winnt + goto lbl_winnt + ;IfErrors 0 lbl_winnt + + lbl_not_winnt: + ; we are not NT + ReadRegStr $R0 HKLM \ + "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber + + ; if empty 'VersionNumber' Erro + StrCmp $R0 "" lbl_error + + + StrCpy $R1 $R0 1 + StrCmp $R1 '4' 0 lbl_error + + StrCpy $R1 $R0 3 + + StrCmp $R1 '4.0' lbl_win32_95 + StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 + + lbl_win32_95: + StrCpy $R0 '95' + Goto lbl_done + + lbl_win32_98: + StrCpy $R0 '98' + Goto lbl_done + + lbl_win32_ME: + StrCpy $R0 'ME' + Goto lbl_done + + lbl_winnt: + + StrCpy $R1 $R0 1 + + StrCmp $R1 '3' lbl_winnt_x + StrCmp $R1 '4' lbl_winnt_x + + StrCpy $R1 $R0 3 + + StrCmp $R1 '5.0' lbl_winnt_2000 + StrCmp $R1 '5.1' lbl_winnt_XP + StrCmp $R1 '5.2' lbl_winnt_2003 + StrCmp $R1 '6.0' lbl_winnt_vista_2008 + StrCmp $R1 '6.1' lbl_winnt_7_2008R2 + StrCmp $R1 '6.2' lbl_winnt_8_2012 + StrCmp $R1 '6.3' lbl_winnt_81_2012R2 lbl_error + + + lbl_winnt_x: + StrCpy $R0 "NT $R0" 6 + Goto lbl_done + + lbl_winnt_2000: + Strcpy $R0 '2000' + Goto lbl_done + + lbl_winnt_XP: + Strcpy $R0 'XP' + Goto lbl_done + + lbl_winnt_2003: + Strcpy $R0 '2003' + Goto lbl_done + + ;----------------- Family - Vista / 2008 ------------- + lbl_winnt_vista_2008: + StrCmp $R2 'Client' go_vista + StrCmp $R2 'Server' go_2008 + + go_vista: + Strcpy $R0 'Vista' + Goto lbl_done + + go_2008: + Strcpy $R0 '2008' + Goto lbl_done + ;----------------------------------------------------- + + ;----------------- Family - 7 / 2008R2 ------------- + lbl_winnt_7_2008R2: + StrCmp $R2 'Client' go_7 + StrCmp $R2 'Server' go_2008R2 + + go_7: + Strcpy $R0 '7' + Goto lbl_done + + go_2008R2: + Strcpy $R0 '2008R2' + Goto lbl_done + ;----------------------------------------------------- + + ;----------------- Family - 8 / 2012 ------------- + lbl_winnt_8_2012: + StrCmp $R2 'Client' go_8 + StrCmp $R2 'Server' go_2012 + + go_8: + Strcpy $R0 '8' + Goto lbl_done + + go_2012: + Strcpy $R0 '2012' + Goto lbl_done + ;----------------------------------------------------- + + ;----------------- Family - 8.1 / 2012R2 ------------- + lbl_winnt_81_2012R2: + StrCmp $R2 'Client' go_81 + StrCmp $R2 'Server' go_2012R2 + + go_81: + Strcpy $R0 '8.1' + Goto lbl_done + + go_2012R2: + Strcpy $R0 '2012R2' + Goto lbl_done + ;----------------------------------------------------- + + lbl_error: + Strcpy $R0 '666' + goto lbl_done + + + lbl_done: + Pop $R1 + Exch $R0 + + +FunctionEnd + + +!macro GetWindowsVersion OUTPUT_VALUE + Call GetWindowsVersion + Pop `${OUTPUT_VALUE}` +!macroend + +!define GetWindowsVersion '!insertmacro "GetWindowsVersion"' !macro X86Files os @@ -110,46 +279,81 @@ UninstPage instfiles Section "Dokan Library x86" section_x86 - ${If} ${IsWin7} + ${GetWindowsVersion} $R0 +/* + ${If} $R0 == '2012R2' + !insertmacro X86Files "win8" + ${ElseIf} $R0 == '8.1' + !insertmacro X86Files "win8" + ${ElseIf} $R0 == '2012' + !insertmacro X86Files "win8" + ${ElseIf} $R0 == '8' + !insertmacro X86Files "win8" +*/ + ${If} $R0 == '7' !insertmacro X86Files "win7" - ${ElseIf} ${IsWin2008R2} + ${ElseIf} $R0 == '2008R2' !insertmacro X86Files "win7" - ${ElseIf} ${IsWinVista} + ${ElseIf} $R0 == 'Vista' !insertmacro X86Files "wlh" - ${ElseIf} ${IsWin2008} + ${ElseIf} $R0 == '2008' !insertmacro X86Files "wlh" - ${ElseIf} ${IsWin2003} + ${ElseIf} $R0 == '2003' !insertmacro X86Files "wnet" - ${ElseIf} ${IsWinXp} + ${ElseIf} $R0 == 'XP' !insertmacro X86Files "wxp" ${EndIf} SectionEnd Section "Dokan Driver x86" section_x86_driver - ${If} ${IsWin7} + ${GetWindowsVersion} $R0 +/* + ${If} $R0 == '2012R2' + !insertmacro X86Driver "win8" + ${ElseIf} $R0 == '8.1' + !insertmacro X86Driver "win8" + ${ElseIf} $R0 == '2012' + !insertmacro X86Driver "win8" + ${ElseIf} $R0 == '8' + !insertmacro X86Driver "win8" +*/ + ${If} $R0 == '7' !insertmacro X86Driver "win7" - ${ElseIf} ${IsWinVista} + ${ElseIf} $R0 == '2008R2' + !insertmacro X86Driver "win7" + ${ElseIf} $R0 == 'Vista' !insertmacro X86Driver "wlh" - ${ElseIf} ${IsWin2008} + ${ElseIf} $R0 == '2008' !insertmacro X86Driver "wlh" - ${ElseIf} ${IsWin2003} + ${ElseIf} $R0 == '2003' !insertmacro X86Driver "wnet" - ${ElseIf} ${IsWinXp} + ${ElseIf} $R0 == 'XP' !insertmacro X86Driver "wxp" ${EndIf} !insertmacro DokanSetup SectionEnd Section "Dokan Driver x64" section_x64_driver - ${If} ${IsWin7} + ${GetWindowsVersion} $R0 +/* + ${If} $R0 == '2012R2' + !insertmacro X64Driver "win8" + ${ElseIf} $R0 == '8.1' + !insertmacro X64Driver "win8" + ${ElseIf} $R0 == '2012' + !insertmacro X64Driver "win8" + ${ElseIf} $R0 == '8' + !insertmacro X64Driver "win8" +*/ + ${If} $R0 == '7' !insertmacro X64Driver "win7" - ${ElseIf} ${IsWin2008R2} + ${ElseIf} $R0 == '2008R2' !insertmacro X64Driver "win7" - ${ElseIf} ${IsWinVista} + ${ElseIf} $R0 == 'Vista' !insertmacro X64Driver "wlh" - ${ElseIf} ${IsWin2008} + ${ElseIf} $R0 == '2008' !insertmacro X64Driver "wlh" - ${ElseIf} ${IsWin2003} + ${ElseIf} $R0 == '2003' !insertmacro X64Driver "wnet" ${EndIf} !insertmacro DokanSetup @@ -211,33 +415,32 @@ Function .onInit ; Windows Version check ${If} ${RunningX64} - ${If} ${IsWin2003} - ${ElseIf} ${IsWinVista} - ${ElseIf} ${IsWin2008} - ${ElseIf} ${IsWin2008R2} - ${ElseIf} ${IsWin7} - ; For Win8 and Server2012 release tests we need to include this WinVer.sh version from NSIS 3.0a2 - ; http://sourceforge.net/p/nsis/code/HEAD/tree/NSIS/trunk/Include/WinVer.nsh - ${ElseIf} ${IsWin8} - ${ElseIf} ${IsWin2012} - ${ElseIf} ${IsWin8.1} - ${ElseIf} ${IsWin2012R2} + ${GetWindowsVersion} $R0 + ${If} $R0 == '2012R2' + ${ElseIf} $R0 == '8.1' + ${ElseIf} $R0 == '2012' + ${ElseIf} $R0 == '8' + ${ElseIf} $R0 == '7' + ${ElseIf} $R0 == '2008R2' + ${ElseIf} $R0 == 'Vista' + ${ElseIf} $R0 == '2008' + ${ElseIf} $R0 == '2003' ${Else} MessageBox MB_OK "Your OS is not supported. Dokan library supports Windows 2003, Vista, 2008, 2008R2 and 7 for x64." Abort ${EndIf} ${Else} - ${If} ${IsWinXP} - ${ElseIf} ${IsWin2003} - ${ElseIf} ${IsWinVista} - ${ElseIf} ${IsWin2008} - ${ElseIf} ${IsWin7} - ; For Win8 and Server2012 release tests we need to include this WinVer.sh version from NSIS 3.0a2 - ; http://sourceforge.net/p/nsis/code/HEAD/tree/NSIS/trunk/Include/WinVer.nsh - ${ElseIf} ${IsWin8} - ${ElseIf} ${IsWin2012} - ${ElseIf} ${IsWin8.1} - ${ElseIf} ${IsWin2012R2} + ${GetWindowsVersion} $R0 + ${If} $R0 == 'XP' + ${ElseIf} $R0 == '2012R2' + ${ElseIf} $R0 == '8.1' + ${ElseIf} $R0 == '2012' + ${ElseIf} $R0 == '8' + ${ElseIf} $R0 == '7' + ${ElseIf} $R0 == '2008R2' + ${ElseIf} $R0 == 'Vista' + ${ElseIf} $R0 == '2008' + ${ElseIf} $R0 == '2003' ${Else} MessageBox MB_OK "Your OS is not supported. Dokan library supports Windows XP, 2003, Vista, 2008 and 7 for x86." Abort From 585d7e1204edda1e8ce3f6e27f0a779f41391d2e Mon Sep 17 00:00:00 2001 From: Clemens Alexander Schulz Date: Wed, 22 Oct 2014 16:58:56 +0200 Subject: [PATCH 5/5] - Include Windows 8 to installer to copy stuff --- dokan_install/install.nsi | 40 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/dokan_install/install.nsi b/dokan_install/install.nsi index debdaf6..a98a92b 100644 --- a/dokan_install/install.nsi +++ b/dokan_install/install.nsi @@ -280,17 +280,15 @@ FunctionEnd Section "Dokan Library x86" section_x86 ${GetWindowsVersion} $R0 -/* ${If} $R0 == '2012R2' - !insertmacro X86Files "win8" + !insertmacro X86Files "win7" ${ElseIf} $R0 == '8.1' - !insertmacro X86Files "win8" + !insertmacro X86Files "win7" ${ElseIf} $R0 == '2012' - !insertmacro X86Files "win8" + !insertmacro X86Files "win7" ${ElseIf} $R0 == '8' - !insertmacro X86Files "win8" -*/ - ${If} $R0 == '7' + !insertmacro X86Files "win7" + ${ElseIf} $R0 == '7' !insertmacro X86Files "win7" ${ElseIf} $R0 == '2008R2' !insertmacro X86Files "win7" @@ -307,17 +305,15 @@ SectionEnd Section "Dokan Driver x86" section_x86_driver ${GetWindowsVersion} $R0 -/* ${If} $R0 == '2012R2' - !insertmacro X86Driver "win8" + !insertmacro X86Driver "win7" ${ElseIf} $R0 == '8.1' - !insertmacro X86Driver "win8" + !insertmacro X86Driver "win7" ${ElseIf} $R0 == '2012' - !insertmacro X86Driver "win8" + !insertmacro X86Driver "win7" ${ElseIf} $R0 == '8' - !insertmacro X86Driver "win8" -*/ - ${If} $R0 == '7' + !insertmacro X86Driver "win7" + ${ElseIf} $R0 == '7' !insertmacro X86Driver "win7" ${ElseIf} $R0 == '2008R2' !insertmacro X86Driver "win7" @@ -335,17 +331,15 @@ SectionEnd Section "Dokan Driver x64" section_x64_driver ${GetWindowsVersion} $R0 -/* ${If} $R0 == '2012R2' - !insertmacro X64Driver "win8" + !insertmacro X64Driver "win7" ${ElseIf} $R0 == '8.1' - !insertmacro X64Driver "win8" + !insertmacro X64Driver "win7" ${ElseIf} $R0 == '2012' - !insertmacro X64Driver "win8" + !insertmacro X64Driver "win7" ${ElseIf} $R0 == '8' - !insertmacro X64Driver "win8" -*/ - ${If} $R0 == '7' + !insertmacro X64Driver "win7" + ${ElseIf} $R0 == '7' !insertmacro X64Driver "win7" ${ElseIf} $R0 == '2008R2' !insertmacro X64Driver "win7" @@ -453,14 +447,14 @@ Function .onInit IfFileExists $SYSDIR\drivers\dokan.sys HasPreviousVersionX64 NoPreviousVersionX64 ; To make EnableX64FSRedirection called in both cases, needs duplicated MessageBox code. How can I avoid this? HasPreviousVersionX64: - MessageBox MB_OK "Please unstall the previous version and restart your computer before running this installer." + MessageBox MB_OK "Please uninstall the previous version and restart your computer before running this installer." Abort NoPreviousVersionX64: ${EnableX64FSRedirection} ${Else} IfFileExists $SYSDIR\drivers\dokan.sys HasPreviousVersion NoPreviousVersion HasPreviousVersion: - MessageBox MB_OK "Please unstall the previous version and restart your computer before running this installer." + MessageBox MB_OK "Please uninstall the previous version and restart your computer before running this installer." Abort NoPreviousVersion: ${EndIf}