Old 18th April 2011, 09:31   #1
marcel-slip
Junior Member
 
Join Date: Jun 2007
Location: Poland
Posts: 16
"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:


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

marcel-slip is offline   Reply With Quote
Old 18th April 2011, 09:33   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
My immediate guess would be you are missing dependencies on those machines. MSVCRT?

Stu
Afrow UK is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump