Archive: "System::Call" Does not always work


"System::Call" Does not always work
I got to rewrite the installer, there is a function of checking the serial number of the dll

But it turns out that this feature on some computers will not work.
(works on most computers)

Please for Help

File is work.dll

some Code:



# Installer pages

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE License.txt
Page custom sprawdzanie LeaveCustom
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

# Included files
!include Sections.nsh
!include MUI2.nsh
!include InstallOptions.nsh
!include LogicLib.nsh
!include FileFunc.nsh
!include WordFunc.nsh


Function pliki
SetOutPath $TEMP\eInspect
File bin\work.dll
FunctionEnd


Function sprawdzanie
IfFileExists $TEMP\eInspect\work.dll +2 0
Call pliki
!insertmacro INSTALLOPTIONS_DISPLAY "check_the_secret_serial_number.ini"
FunctionEnd


Function LeaveCustom
!insertmacro INSTALLOPTIONS_READ $R8 "check_the_secret_serial_number.ini" "Field 1" "State"
${StrFilter} $R8 "+" "" "" $R9
WriteRegStr HKLM "Software\XXXXX\YYYYYY" "SerialNumber" $R9
System::Call '$TEMP\eInspect\work.dll::work() i() .r3'
${If} $3 == '0'
MessageBox MB_OK "SN is OK"
Abort
${ElseIf} $3 == '1'
GoTo done
${EndIf}
done:
WriteRegStr HKLM "Software\XXXXX\YYYYYY" "SerialNumber" $R9
FunctionEnd

My immediate guess would be you are missing dependencies on those machines. MSVCRT?

Stu