Try something like this

! The Wizard Loop displays the dialog screens that the user sees in the
installation
Set Variable %_INSTALL_ERROR% to "0"
Loop Wizard (Abort Dialog Active)
If %_SB_INSTALLDIR% Contains "%_CSIDL_PROGRAM_FILES%" Then
Set Variable %_INSTALL_ERROR% to "1"
End
If %_SB_INSTALLDIR% Contains "%_CSIDL_DESKTOP%" Then
Set Variable %_INSTALL_ERROR% to "1"
End
If %_SB_INSTALLDIR% Contains "%_CSIDL_PERSONAL%" Then
Set Variable %_INSTALL_ERROR% to "1"
End
If %_SB_INSTALLDIR% Contains "%_CSIDL_APPDATA%" Then
Set Variable %_INSTALL_ERROR% to "1"
End

If %_INSTALL_ERROR% Equals "1" Then
Set Variable %_INSTALL_ERROR% to "0"
Display Message Box ("Stellar kan ikke installeres i denne
mappe\n\n", "Vælg en anden mappe")
Set Variable %_SB_INSTALLDIR% to "[INSTALLDIR]"
Cycle Loop
End
End



/Michael