NewsArchive
02-21-2005, 09:49 AM
[Monday, February 21, 2005 4:10 PM]
Hello all,
I needed to be able to let in a setup the user decide whether he wanted a
plain soft installation or a lan "connection" to an already installed soft!
In case anyone has the same needs here is the script code I finally came to
:
I just added the two types of installs in setup types ......
[ Setup Types ]
! If setup types are enabled, %SB_SETUPTYPEID% holds the selected type
! Warning: It is not recommended to manually modify the %SB_SETUPTYPEID%
variable!
:: Define Setup Type: MonoPoste ou Serveur
:: Define Setup Type: Poste de Travail
! Wizard dialog definition(s)
Here I added a select file dialog box which is hidden afterwards......
[ Interview User Interface ]
Define Wizard Dialog: #1 (Welcome)
Define Wizard Dialog: #2 (Readme)
Define Wizard Dialog: #3 (Select Setup Types [Standard])
Define Wizard Dialog: #4 (Select Program Folder)
Define Wizard Dialog: #5 (Select Install Folder)
Define Wizard Dialog: #6 (Select File)
Define Wizard Dialog: #7 (Ready to Install)
! The Wizard Loop displays the dialog screens that the user sees in the
installation
I just added a couple of variables and "checkpoints" .....
Set Variable %POSTE_TRAVAIL% to 0 "lan"
installation variable
Loop Wizard
Handle Wizard Events()
If %_SB_SETUPTYPEID% Equals "1" Then "normal"
installation
Show Wizard Dialog #4
Show Wizard Dialog #5
Hide Wizard Dialog #6
ElseIf %_SB_SETUPTYPEID% Equals "2" Then "lan" installation
Set Variable %POSTE_TRAVAIL% to 1
Hide Wizard Dialog #4
Hide Wizard Dialog #5
Set Variable %_SB_INSTALLDIR% to ExtractFolder(%_SB_INSTALLDIR%)
"select file" dialog so extract folder
Show Wizard Dialog #6
End
End
If %POSTE_TRAVAIL% Equals "1" Then
"lan" install chosen
Set Variable %RECOMMENCER_SERVEUR% to 0 "start again"
variable for checking correct lan folder etc ...
If %_SB_INSTALLDIR% Equals "" Or %_SB_INSTALLDIR% Contains Not Letters In
"cgf.exe" Then
Message Box "ATTENTION :\n\nVous devez sélectionner le fichier ..." --
"CGF Suite Comptable"
Set Variable %RECOMMENCER_SERVEUR% to 1
End
If %RECOMMENCER_SERVEUR% Equals "1" Then
Exit Installation
HERE I would like to get again the selct file dialog wizard.........
End
ElseIf %POSTE_TRAVAIL% Equals "0" Then
"normal" install chosen -> install files
! Display progress dialog
Display Setup Progress Dialog
! Create installation .log
Create Installation Log %_SB_INSTALLDIR%\uninst.log
[ Create Folders ]
::Create Folder %_SB_INSTALLDIR%\Export (Always Install)
::Create Folder %_SB_INSTALLDIR%\Graphiques (Always Install)
::Create Folder %_SB_INSTALLDIR%\Graphiques\Evolution (Always Install)
::Create Folder %_SB_INSTALLDIR%\Graphiques\Resultats (Always Install)
::Create Folder %_SB_INSTALLDIR%\img (Always Install)
::Create Folder %_SB_INSTALLDIR%\img\pays (Always Install)
::Create Folder %_SB_INSTALLDIR%\img\prd (Always Install)
::Create Folder %_SB_INSTALLDIR%\Import (Always Install)
::Create Folder %_SB_INSTALLDIR%\Zip (Always Install)
::Create Folder %_SB_INSTALLDIR%\Zip\Origine (Always Install)
[ Install Files ]
Install File "J:\003.ico" to %_SB_INSTALLDIR%\003.ico (Always Install)
................................................
end
here are shortcuts etc which are common to both installs .....
If all this can help someone.....
--
Cordialement - Best Regards
Jean-Pierre GUTSATZ
Hello all,
I needed to be able to let in a setup the user decide whether he wanted a
plain soft installation or a lan "connection" to an already installed soft!
In case anyone has the same needs here is the script code I finally came to
:
I just added the two types of installs in setup types ......
[ Setup Types ]
! If setup types are enabled, %SB_SETUPTYPEID% holds the selected type
! Warning: It is not recommended to manually modify the %SB_SETUPTYPEID%
variable!
:: Define Setup Type: MonoPoste ou Serveur
:: Define Setup Type: Poste de Travail
! Wizard dialog definition(s)
Here I added a select file dialog box which is hidden afterwards......
[ Interview User Interface ]
Define Wizard Dialog: #1 (Welcome)
Define Wizard Dialog: #2 (Readme)
Define Wizard Dialog: #3 (Select Setup Types [Standard])
Define Wizard Dialog: #4 (Select Program Folder)
Define Wizard Dialog: #5 (Select Install Folder)
Define Wizard Dialog: #6 (Select File)
Define Wizard Dialog: #7 (Ready to Install)
! The Wizard Loop displays the dialog screens that the user sees in the
installation
I just added a couple of variables and "checkpoints" .....
Set Variable %POSTE_TRAVAIL% to 0 "lan"
installation variable
Loop Wizard
Handle Wizard Events()
If %_SB_SETUPTYPEID% Equals "1" Then "normal"
installation
Show Wizard Dialog #4
Show Wizard Dialog #5
Hide Wizard Dialog #6
ElseIf %_SB_SETUPTYPEID% Equals "2" Then "lan" installation
Set Variable %POSTE_TRAVAIL% to 1
Hide Wizard Dialog #4
Hide Wizard Dialog #5
Set Variable %_SB_INSTALLDIR% to ExtractFolder(%_SB_INSTALLDIR%)
"select file" dialog so extract folder
Show Wizard Dialog #6
End
End
If %POSTE_TRAVAIL% Equals "1" Then
"lan" install chosen
Set Variable %RECOMMENCER_SERVEUR% to 0 "start again"
variable for checking correct lan folder etc ...
If %_SB_INSTALLDIR% Equals "" Or %_SB_INSTALLDIR% Contains Not Letters In
"cgf.exe" Then
Message Box "ATTENTION :\n\nVous devez sélectionner le fichier ..." --
"CGF Suite Comptable"
Set Variable %RECOMMENCER_SERVEUR% to 1
End
If %RECOMMENCER_SERVEUR% Equals "1" Then
Exit Installation
HERE I would like to get again the selct file dialog wizard.........
End
ElseIf %POSTE_TRAVAIL% Equals "0" Then
"normal" install chosen -> install files
! Display progress dialog
Display Setup Progress Dialog
! Create installation .log
Create Installation Log %_SB_INSTALLDIR%\uninst.log
[ Create Folders ]
::Create Folder %_SB_INSTALLDIR%\Export (Always Install)
::Create Folder %_SB_INSTALLDIR%\Graphiques (Always Install)
::Create Folder %_SB_INSTALLDIR%\Graphiques\Evolution (Always Install)
::Create Folder %_SB_INSTALLDIR%\Graphiques\Resultats (Always Install)
::Create Folder %_SB_INSTALLDIR%\img (Always Install)
::Create Folder %_SB_INSTALLDIR%\img\pays (Always Install)
::Create Folder %_SB_INSTALLDIR%\img\prd (Always Install)
::Create Folder %_SB_INSTALLDIR%\Import (Always Install)
::Create Folder %_SB_INSTALLDIR%\Zip (Always Install)
::Create Folder %_SB_INSTALLDIR%\Zip\Origine (Always Install)
[ Install Files ]
Install File "J:\003.ico" to %_SB_INSTALLDIR%\003.ico (Always Install)
................................................
end
here are shortcuts etc which are common to both installs .....
If all this can help someone.....
--
Cordialement - Best Regards
Jean-Pierre GUTSATZ