Reply to Thread

Post a reply to the thread: SB5 Backup Directory created on fresh install

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 05-10-2006, 02:08 AM
    linder

    Re: SB5 Backup Directory created on fresh install

    Garth,

    Then create your own variable ;-) For example:

    Set Variable %DIRTEST% to [INSTALLDIR]
    If %DIRTEST% Folder exists Then
    etc.

    Does this help?
  • 05-10-2006, 01:57 AM
    gbrydon

    Re: SB5 Backup Directory created on fresh install

    The %_SB_INSTALLDIR% hasn't been initialised when the check is done, so it will always fail and never create the backup folder. That's why used the [INSTALLDIR] variable to check.

    I only want the backup folder not to be created if the product has never been installed before.
  • 05-09-2006, 03:57 AM
    linder

    Re: SB5 Backup Directory created on fresh install

    Garth,

    [INSTALLDIR] is a compiler variable. Please use the %_SB_INSTALLDIR% runtime variable in your If Statement!

    Does this help?

    BTW, if you "disable" the backup folder and the installer has to replace (for whatever reason) an existing file, no backup is created and rollback does not work any longer!
  • 05-09-2006, 03:49 AM
    gbrydon

    Re: SB5 Backup Directory created on fresh install

    Hi

    Sorry for the late reply.
    I've tried what you suggested in your last comment. It still doesn't work. Here's a snippet of what I have:

    [ Initialize Setup ]
    ! %SB_BACKUPDIR% holds the path that all backup files will be copied to when overwritten
    If [INSTALLDIR] Folder exists Then
    Set Variable %_SB_BACKUPDIR% to [INSTALLDIR]\BACKUP
    End

    ! Important: Initialize default install folder and program group variables
    Set Variable %_SB_INSTALLDIR% to [INSTALLDIR]
    Set Variable %_SB_PROGRAMGROUP% to [PRODUCTNAME]


    When does this check if the folder exists occur? To me it seems as if its firing after the [Create Folders] section.
  • 05-04-2006, 02:13 AM
    linder

    Re: SB5 Backup Directory created on fresh install

    Garth,

    Just check if your application is already there (e.g. if the installation folder already exists, etc.) and then use an If..Then Statement to create/or not create the backup folder ;-)

    HTH,
  • 05-04-2006, 01:26 AM
    gbrydon

    Re: SB5 Backup Directory created on fresh install

    Not really. I only want the backup directory to be created if the product has been installed before on the particular machine. If its being installed for the first time the backup shouldn't be created (because there are no files to backup).
  • 05-03-2006, 08:31 AM
    linder

    Re: SB5 Backup Directory created on fresh install

    Garth,

    The following line in your script creates the backup folder:

    ! %SB_BACKUPDIR% holds the path that all backup files will be copied to when overwritten
    Set Variable %_SB_BACKUPDIR% to "%_SB_INSTALLDIR%\BACKUP"

    Does this help?
  • 05-03-2006, 08:26 AM
    gbrydon

    SB5 Backup Directory created on fresh install

    When a client installs our product on a clean machine i.e. he/she hasn't installed this product ever before, the backup directory is still created. Why is this? And how do we stop this from happening?

    NB. We do not want the backup directory not to be created if its not a clean install, only if its for the very first time.

    Garth

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •