PDA

View Full Version : Modifying %_SB_INSTALLDIR%



NewsArchive
10-08-2009, 03:15 AM
Using SetupBuilder 7 (7.0.2734). I am trying to modify the %_SB_INSTALLDIR%
variable after the 'Select install folder' dialog (see code below). When I
display the %_SB_INSTALLDIR% variable before the code, it is as I would
expect it but after I remove the last 4 characters and dispaly the variable
after the last 'Set Variable', it is back to the original setting and the
%TEMP_INSTALL_DIR% is correct (last 4 characters removed). What am I doing
wrong? Also this install runs in silent mode, this is why I need to modify.

! If silent mode, remove \HL7 from _SB_INSTALLDIR
If %_SB_INSTALLERFLAG% Equals "1" on Position "1" Then
Set Variable %FOLDER_LENGTH% to FUNCTION:Len(%_SB_INSTALLDIR%)
Set Variable %FOLDER_LENGTH% to (Decrement Variable by 4)
Set Variable %TEMP_INSTALL_DIR% to FUNCTION:Mid(%_SB_INSTALLDIR%,
%FOLDER_LENGTH%, 1)
Set Variable %_SB_INSTALLDIR% to "%TEMP_INSTALL_DIR%"
End

Dee Witham

NewsArchive
10-08-2009, 03:16 AM
Lots of ways you might approach this, Dee.

See whether the attached does what you want.

Jane

NewsArchive
10-08-2009, 03:16 AM
Jane - thanks - I will give it a try. Dee