Skip to content
⌘ NSIS Forum Archive

How to repeat a test ?

5 posts

cooladn#

How to repeat a test ?

Hi!
i write two exec files CD1.exe and CD2.exe, each will be on a CD-rom.
On the first, after doing installation, i inform user to change Cd.
As i need to test if CD2.exe exist, i write this code :

IfFileExists "$EXEDIR\TagCD2.exe" FT TG
TG:
MessageBox MB_OK|MB_ICONINFORMATION "Insert CD 2"
goto FT:
FT:

How to repeat this test until the user insert the second CD-rom ?

Thinks for your help
Koen van de Sande#
Re: How to repeat a test ?

Change it like this (the prompt is always shown once, and shown again until the CD is inserted):

TG:
MessageBox MB_OK|MB_ICONINFORMATION "Insert CD 2"
IfFileExists "$EXEDIR\TagCD2.exe" FT TG
FT:
This should do the trick 😁
rainwater#
What if the user never inserts the cd-rom though? You should use a sleep, and then have a counter that will only wait for x amount of time.