diff --git a/Include/FileFunc.nsh b/Include/FileFunc.nsh index da8a92f3..d9219299 100644 --- a/Include/FileFunc.nsh +++ b/Include/FileFunc.nsh @@ -1,7 +1,7 @@ /* _____________________________________________________________________________ - File Functions Header v2.6 + File Functions Header v2.7 _____________________________________________________________________________ 2005 Shengalts Aleksander aka Instructor (Shengalts@mail.ru) @@ -1365,8 +1365,14 @@ RefreshShellIcons Function ${_FILEFUNC_UN}GetExeName Push $0 + Push $1 + Push $2 System::Call 'kernel32::GetModuleFileNameA(i 0, t .r0, i 1024)' - #System::Call 'kernel32::GetLongPathNameA(t r0, t .r0, i 1024)' + System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2' + StrCmp $2 error +2 + StrCpy $0 $1 + Pop $2 + Pop $1 Exch $0 FunctionEnd @@ -1384,8 +1390,14 @@ RefreshShellIcons Function ${_FILEFUNC_UN}GetExePath Push $0 + Push $1 + Push $2 StrCpy $0 $EXEDIR - #System::Call 'kernel32::GetLongPathNameA(t r0, t .r0, i 1024)' + System::Call 'kernel32::GetLongPathNameA(t r0, t .r1, i 1024)i .r2' + StrCmp $2 error +2 + StrCpy $0 $1 + Pop $2 + Pop $1 Exch $0 FunctionEnd