SetupBuilder Community  

Go Back   SetupBuilder Community > SetupBuilder Software Installation System > SetupBuilder - NNTP

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-21-2005, 08:49 AM
NewsArchive NewsArchive is offline
Senior Member
 
Join Date: Jan 2005
Posts: 27,144
Default Conditional copy files

[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
Reply With Quote
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to copy files from install CD Joe Snyder SetupBuilder 'How Do I' Questions 1 11-09-2006 11:33 PM
Static Scan duplicates Clarion dll files SB5 Build 1196 possibly clarion version chan NewsArchive SetupBuilder - NNTP 1 07-19-2005 01:21 AM
Adding files NewsArchive SetupBuilder - NNTP 4 04-24-2005 04:38 AM
Copy Local File(s) NewsArchive SetupBuilder - NNTP 1 03-13-2005 08:41 AM
Copy file(s) NewsArchive SetupBuilder - NNTP 1 03-03-2005 06:00 AM


All times are GMT -6. The time now is 09:29 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004-2012 Lindersoft