dTomoyo
4th December 2001 12:53 UTC
How to check $INSTALLERNAME
Hi~
How to check $INSTALLERNAME ?
I tried to use under code.
FindFirst $0 $1 $EXEDIR\inst*.exe
StrCmp $1 'inst1234.exe' GoodName CheckRetry
CheckRetry:
FindNext ???
StrCmp ? 'inst1234.exe GoodName
Goto CheckRetry
ErrorInst:
MessageBox MB_OK "Error! Installer File is corrupted."
Abort
GoodName:
inst1234.exe = $INSTALLERNAME
but, can't get installer name in $EXEDIR.
please, help me.
F. Heidenreich
4th December 2001 23:26 UTC
Hi dTomoyo,
I've added some lines of code and now I think you could check your installername ;)
Name "Installer 1234"
OutFile inst1234.exe
Function .onInit
FindFirst $0 $1 $EXEDIR\inst*.exe
StrCmp $1 'inst1234.exe' GoodName CheckRetry
CheckRetry:
FindNext $0 $1
StrCmp $1 '' ErrorInst
StrCmp $1 'inst1234.exe' GoodName ErrorInst
Goto CheckRetry
ErrorInst:
MessageBox MB_OK "Error! Installer File is corrupted."
Abort
GoodName:
FunctionEnd
Section
MessageBox MB_OK "Have a good time :)"
SectionEnd
~ Florian
F. Heidenreich
4th December 2001 23:30 UTC
But you could have the same behaviour by this short script:
Name "Installer 1234"
OutFile inst1234.exe
Function .onInit
IfFileExists $EXEDIR\inst1234.exe GoodName ErrorInst
ErrorInst:
MessageBox MB_OK "Error! Installer File is corrupted."
Abort
GoodName:
FunctionEnd
Section
MessageBox MB_OK "Have a good time :)"
SectionEnd
~ Florian
dTomoyo
5th December 2001 01:05 UTC
WOW!
It's simple!
Thank you very much. F. Heidenreich.
:) :) :)