Post a reply to the thread: SB5 Backup Directory created on fresh install
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
Will turn www.example.com into [URL]http://www.example.com[/URL].
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?
Re: SB5 Backup Directory created on fresh install
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.
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!
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.
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,
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).
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?
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
SB5 Backup Directory created on fresh install
Forum Rules