I'm developing an installation file in Inno setup. It has 3 different optional components to install when user selects 'custom'.
It works fine, but when /SILENT
parameter is passed, no component is installed. I suppose because no component is checked.
...here is the code fragment related:
[Types]
Name: custom; Description: {cm:instCustom}; Flags: iscustom
Name: full; Description: {cm:instFull}
[Components]
Name: Programador; Description: {cm:cmpProgramador}; Types: full
Name: Usuario; Description: {cm:cmpUsuario}; Types: full
Name: Reporte; Description: {cm:cmpReporte}; Types: full
[Icons]
Name: {group}\{cm:cmpProgramador}; Filename: {app}\Programador\{#MyAppExeNameA}; Components: Programador
Name: {group}\{cm:cmpUsuario}; Filename: {app}\Usuario\{#MyAppExeNameB}; Components: Usuario
Name: {group}\{cm:cmpReporte}; Filename: {app}\Reporte\{#MyAppExeNameC}; Components: Reporte
Name: {group}\Desinstalar MIVES; Filename: {uninstallexe}
[Registry]
Root: HKCU; Subkey: Software\UPC; Flags: uninsdeletekey
Root: HKCU; Subkey: Software\UPC\MIVES
Root: HKLM; Subkey: Software\UPC; Flags: uninsdeletekey
Root: HKLM; Subkey: Software\UPC\MIVES
Root: HKLM; Subkey: Software\UPC\MIVES\Settings; ValueType: string; ValueName: InstallPath; ValueData: {app}
; file association depens of the components selected
Root: HKCR; Subkey: .mip; ValueType: string; ValueData: mip_auto_file; Flags: uninsdeletekey; Components: Programador
Root: HKCR; Subkey: mip_auto_file; Flags: uninsdeletekey; Components: Programador
Root: HKCR; Subkey: mip_auto_file\shell\open\command; ValueType: expandsz; ValueData: {app}\Programador\{#MyAppExeNameA} %1; Components: Programador
Root: HKCR; Subkey: .miu; ValueType: string; ValueData: miu_auto_file; Flags: uninsdeletekey; Components: Usuario
Root: HKCR; Subkey: miu_auto_file; Flags: uninsdeletekey; Components: Usuario
Root: HKCR; Subkey: miu_auto_file\shell\open\command; ValueType: expandsz; ValueData: {app}\Usuario\{#MyAppExeNameB} %1; Components: Usuario
Root: HKCR; Subkey: .mir; ValueType: string; ValueData: mir_auto_file; Flags: uninsdeletekey; Components: Reporte
Root: HKCR; Subkey: mir_auto_file; Flags: uninsdeletekey; Components: Reporte
Root: HKCR; Subkey: mir_auto_file\shell\open\command; ValueType: expandsz; ValueData: {app}\Reporte\{#MyAppExeNameC} %1; Components: Reporte
[Files]
Source: {#MyAppExeNameA}; DestDir: {app}\Programador; Flags: promptifolder; Components: Programador
Source: {#MyAppExeNameB}; DestDir: {app}\Usuario; Flags: promptifolder; Components: Usuario
Source: {#MyAppExeNameC}; DestDir: {app}\Reporte; Flags: promptifolder; Components: Reporte
I need that one of the three components (component 'Usuario') was installed by default when the /silent
or /verysilent
parameter is passed.
I think I have to use Check: WizardSilent
, but I don't know where. In fact, I tried adding the WizardSilent
in Components
section, but nothing happens:
[Components]
Name: Programador; Description: {cm:cmpProgramador}; Types: full
Name: Usuario; Description: {cm:cmpUsuario}; Types: full; Check: WizardSilent
Neither in the Files
section:
[Files]
Source: {#MyAppExeNameB}; DestDir: {app}\Usuario; Flags: promptifolder; Components: Usuario; Check: WizardSilent
Here is what I need:
MIVES_211.exe /SP- /verysilent
>>> installs "Usuario" component by default (silent mode, and no/components
parameter)MIVES_211.exe /SP- /silent /components=Reporte
>>> installs only "Reporte" component (silent mode, andcomponents
parameter)MIVES_211.exe /SP- /silent /components=Usuario,Reporte
>>> installs "Usuario" and "Reporte" components (silent mode, andcomponents
parameter)
EDITED:
I think I've found one solution, but I don't know if it is a good solution. Just added one new type including the WizardSilent
check:
[Types]
Name: silent; Description: {cm:instCustom}; Check: WizardSilent
Name: custom; Description: {cm:instCustom}; Flags: iscustom
Name: full; Description: {cm:instFull}
And use it in the components section, component "Usuario" (the component I want to install by default in a silent installation):
[Components]
Name: Programador; Description: {cm:cmpProgramador}; Types: full
Name: Usuario; Description: {cm:cmpUsuario}; Types: full silent
Name: Reporte; Description: {cm:cmpReporte}; Types: full
Now, it works really as I want. But I don't like to have two types with the same description, unless only one is showed in the setup wizard.
Is it a good idea?
Thanks!
/silent
to install? What installation type? What components? What did you do/try to make this happen? – Martin Prikryl