I need to check if the C: \ SISAUTO, C: \ BASESISAUTO folder exists. If there are folders, create a new one for example C: \ SISAUTO2, C: \ BASESISAUTO2
Follow the code below.
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "SISAUTO - SISTEMA DE AUTOMAÇÃO COMERCIAL"
#define MyAppVersion "7.0.23"
#define MyAppPublisher "SUPPORT INFORMÁTICA"
#define MyAppURL "http://www.support-br.com.br"
#define MyAppExeName "MyProg.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0D0A707B-5DF4-4AF9-BC4C-133886E5E379}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=no
OutputDir=C:\Users\SERVER\Desktop\Arquivos para Executavel\Output
OutputBaseFilename=INSTALADOR_SISAUTO_2017
SetupIconFile=C:\Users\SERVER\Desktop\Arquivos para Executavel\SISAUTO\install.ico
Compression=lzma
SolidCompression=yes
DisableWelcomePage=no
DisableDirPage=yes
DisableProgramGroupPage=yes
DisableReadyMemo=yes
DisableReadyPage=yes
DisableStartupPrompt=yes
DisableFinishedPage=no
[Languages]
Name: brazilianportuguese; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
[Tasks]
Name: desktopicon; Description: Create a &desktop icon; GroupDescription: Additional icons:
[Dirs]
Name: C:\SISAUTO
Name: C:\BASESISAUTO
Name: C:\BASESISAUTO\GERNFE2
Name: C:\BASESISAUTO\BASE1
Name: C:\notas
Name: C:\ACBrMonitorPLUS
Name: C:\Unimake
Name: C:\Unimake\UniNFe
Name: C:\Unimake\UniDANFE
[Files]
Source: C:\Users\SERVER\Desktop\Arquivos para Executavel\BASESISAUTO\GERNFE2\*; DestDir: C:\BASESISAUTO\GERNFE2; Flags: recursesubdirs onlyifdoesntexist confirmoverwrite; Tasks:
Source: C:\Users\SERVER\Desktop\Arquivos para Executavel\BASESISAUTO\BASE1\*; DestDir: C:\BASESISAUTO\BASE1; Flags: recursesubdirs onlyifdoesntexist confirmoverwrite
Source: C:\Users\SERVER\Desktop\Arquivos para Executavel\SISAUTO\*; DestDir: C:\SISAUTO; Flags: recursesubdirs onlyifdoesntexist confirmoverwrite
Source: C:\Users\SERVER\Desktop\Arquivos para Executavel\ACBrMonitorPLUS\*; DestDir: C:\ACBrMonitorPLUS; Flags: recursesubdirs onlyifdoesntexist confirmoverwrite; Tasks: ; Languages:
Source: C:\Users\SERVER\Desktop\Arquivos para Executavel\UniNFe\*; DestDir: C:\Unimake\UniNFe; Flags: recursesubdirs onlyifdoesntexist confirmoverwrite
Source: C:\Users\SERVER\Desktop\Arquivos para Executavel\UniDANFE\*; DestDir: C:\Unimake\UniDANFE; Flags: recursesubdirs onlyifdoesntexist confirmoverwrite
[Icons]
Name: {userdesktop}\SISAUTO; Filename: C:\SISAUTO\sisauto.exe; Tasks: desktopicon
Name: {userdesktop}\GERNFE2; Filename: C:\BASESISAUTO\GERNFE2\gernfe2.exe; Tasks: desktopicon
Name: {userdesktop}\ACBrMonitorPLUS; Filename: C:\ACBrMonitorPLUS\ACBrMonitor.exe; Tasks: desktopicon
Name: {userdesktop}\UNINFE; Filename: C:\Unimake\UniNFe\uninfe.exe; Tasks: desktopicon
Name: {userdesktop}\UNIDANFE; Filename: C:\Unimake\UniDANFE\unidanfe.exe; Tasks: desktopicon
Name: {commonstartup}\GERNFE2; Filename: C:\BASESISAUTO\GERNFE2\gernfe2.exe
Name: {commonstartup}\ACBrMonitorPLUS; Filename: C:\ACBrMonitorPLUS\ACBrMonitor.exe
Name: {commonstartup}\UniNFe; Filename: C:\Unimake\UniNFe\uninfe.exe
[_ISTool]
UseAbsolutePaths=true
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Run]
Filename: C:\SISAUTO\InstalaDLL2.exe
Filename: C:\ACBrMonitorPLUS\ACBrMonitor.exe; Flags: nowait runminimized hidewizard runhidden
Filename: C:\Unimake\UniNFe\uninfe.exe; Flags: nowait runminimized hidewizard runhidden