Soundbod
Posts: 2
Joined: Fri Oct 15, 2010 2:31 pm

Ask User What To Install?

I'm not a programmer or anything like it and so know next to nothing about creating installers so apologies in advance if what I'm asking is very simple or not even possible.

I work for a charity and have created some macros that automate tasks that are not that accessible to blind and visually impaired people using specific pieces of software and these macros have been compiled as separate .exe files, lets call them Macro 1, Macro 2 and Macro 3.

I've used the Freeware version of Advanced Installer 7.7 to create a .msi file which installs these macros into the correct directories along with some bitmaps which one of the macros needs for image recognition and creates shortcuts on the quick launch toolbar which all works fine. However there are two different versions of a particular piece of software we use which I've had to create two different macros for. Rather than create two different .msi's to install the different versions of the macro I'd like to create one .msi which contains all the macros and both versions of this one particular macro so that in the .msi there would be Macro 1, Macro 2, Macro 2b, Macro 3.

When the end user double clicks the .msi I'd like it to ask them what version of this particular piece of software they are using. If they tick v2.11 then the installer would install:
Macro 1
Macro 2
Macro 3

But if they answer v2.13 then the installer would install:
Macro 1
Macro 2b
Macro 3

Is such a thing possible in the free version of Advanced Installer or if not is it possible in another version of Advanced Installer (hopefully just the Professional version as I don't think we could afford the Enterprise version) and most importantly, how?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Ask User What To Install?

Hi,

Unfortunately this is not supported by the free version. In a Professional project you can try this:
- go to Organization page
- create a new feature for Macro 2b
- add Macro 2b component under this feature
- in "Dialogs" page add SetupTypeDlg dialog

This way the user can select which features he wants installed. I'm afraid that conditioning elements based on custom UI is supported only in the Enterprise version.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Soundbod
Posts: 2
Joined: Fri Oct 15, 2010 2:31 pm

Re: Ask User What To Install?

Cheers for that, much appreciated. I just need to persuade my boss to buy the Professional version, sadly I know that we couldn't afford the Enterprise edition.
IB85lb
Posts: 27
Joined: Tue Oct 12, 2010 10:02 am

Re: Ask User What To Install?

I'm afraid that conditioning elements based on custom UI is supported only in the Enterprise version
if we have an Enterprise version how we can made it as the user see 2 type similar to typical and complete but i want to put client 1 and client 2
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Ask User What To Install?

Hi,

You can try this approach:
- add "SetupTypeDlg" dialog in "Dialogs" page
- remove "Typical" and "Custom" buttons
- create your own custom buttons (for example "Client 1" and "Client 2")
- for each button add published control events which look like this:

Code: Select all

NewDialog   FolderDlg
AddLocal    <client_feature>
- where you replace "<client_feature>" with the feature you want to install ("Client 1" or "Client 2")
- create this Init control event:

Code: Select all

Remove      ALL
Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IB85lb
Posts: 27
Joined: Tue Oct 12, 2010 10:02 am

Re: Ask User What To Install?

thanks cosmin
its work good
but

Code: Select all

Code:  Remove      ALL
-what will do this code.
-every client has a different shortcut how i can make it.

best regard
IB85lb
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Ask User What To Install?

Hi,
what will do this code.
The "Remove" control event makes sure that none of the features are marked for installation. This way the AddLocal events can mark only the feature you want.
-every client has a different shortcut how i can make it.
I'm not sure I understand your question. Can you please give me more details?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IB85lb
Posts: 27
Joined: Tue Oct 12, 2010 10:02 am

Re: Ask User What To Install?

hello
-every client has a different shortcut how i can make it
i mean that client1 has a shortcut different from client 2 so, how i can let the when client 2 install his own shortcut and client1 his own shortcut

because the way that you told about it install only shortcut for clint1 in the desktop
but client2 when it install there is no shortcut in desktop.

i have a problem if i want to use upgrade for client 1 only and if i want to do upgrade for client 1 and client 2 if each upgrade different then the second upgrade
how i can do it .

Best regards
IB85lb
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Ask User What To Install?

Hi,

If each client has different executables with different names, you can create a shortcut for each of them. The shortcut is automatically added to the executable component, so it's created only if the EXE is installed.

If the clients use different EXE files with the same name, you can try creating a shortcut to external file which points to the EXE. This shortcut can be moved in "Organization" page into a component from a feature which is always installed. If you don't have common resources for both clients, you can try creating a registry entry just for the shortcut component.

In this case, the common feature must also be added to the AddLocal control events. For example:

Code: Select all

AddLocal    <client_feature>, CommonFeature
i have a problem if i want to use upgrade for client 1 only and if i want to do upgrade for client 1 and client 2 if each upgrade different then the second upgrade
how i can do it .
I'm not sure I understand what you mean. Can you please give me more details? An upgrade process uninstalls the old version before performing a clean install of the new version.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IB85lb
Posts: 27
Joined: Tue Oct 12, 2010 10:02 am

Re: Ask User What To Install?

hello

sorry but i am not an advance user in advance installer enterprise
so the way that u told me about it i didnot under stand it
my problem that i have one application contain 2 folders one for client 1 and other to client2
so i create in the organization 2 feature(client1)(client2)
when i install one of them install good but i want to create an shortcut for every client application but i didnot know how bec the when i create the defoult shortcut in the folder and files page it only crats for one feature is client1.
other problem is if i want to upgrade client 1 or client 2 how i can upgrade them since all of them are in the same installer.

does my way is correct and if any other ways can help me plz tel me.

best regards
IB85lb
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Ask User What To Install?

Hi,

I'm not sure I understand what application structure you are using. Do you have one application (EXE file) or two? If you have just one application, what do the client features represent? Is a client feature a separate application or just some files and folders for your main application? Can you please give me more details?

Each shortcut is added in the feature which contains the shortcut target. So if you have two EXE files placed in separate features, their shortcuts will also be placed in separate features automatically.
other problem is if i want to upgrade client 1 or client 2 how i can upgrade them since all of them are in the same installer.
An upgrade process is performed for an installer. If your package installs both clients, an upgrade will also affect both of them. An upgrade process automatically uninstalls the old package before installing the new version. This is the same as manually uninstalling an old version before installing a new one.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IB85lb
Posts: 27
Joined: Tue Oct 12, 2010 10:02 am

Re: Ask User What To Install?

hello
client 1 and client 2 are in the same exe but the different is that client 1 should installs some files and folders and client 2 should also install files and folder but different than that in client 1 so when we install client 1 folder should put shortcut in desktop and the same as client 2 .
if i didnot put a good discussion about my problem .tell me how i can when i press client 1 install an msi that i chain it with my installer in my installer .

- i made an separate installer his job is to install a required programs for my application the problem is when it check if which programs are install or not , it selected all the programs that there action skip and install how ican make him only select what should install and remove the other .


Best Rgards
IB85lb
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Ask User What To Install?

Hi,

Since both clients use the same EXE, you can share the EXE component between the two client features. To share a component with a feature drag and drop it over that feature while the Shift key is pressed. This way the component will be installed by both features. Since the shortcut is in the same component, it should also be installed.
the problem is when it check if which programs are install or not , it selected all the programs that there action skip and install how ican make him only select what should install and remove the other .
I'm not sure I understand what you mean. Are you using feature-based prerequisites? Can you please give me more details?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IB85lb
Posts: 27
Joined: Tue Oct 12, 2010 10:02 am

Re: Ask User What To Install?

the problem is when it check if which programs are install or not , it selected all the programs that there action skip and install how i can make him only select what should install and remove the other .

the prerequisites when i select them as global prerequisites the select boxes will be empty if the action is skip and if the action is install the boxes is checked.
but when select the prerequisites as
feature-based prerequisites installs during main MSI install
the select boxes will be checked if the action is skip and if the action is install .
how i can make in the select boxes will be empty if the action is skip and if the action is install if select the prerequisites as
feature-based prerequisites installs during main MSI install
its better to under stand
[img]
Untitled.jpg
Untitled.jpg (56.17 KiB) Viewed 13934 times
[/img] in
global prerequisites
[img]
how i can make it similar to untitled.jpg
how i can make it similar to untitled.jpg
Untitled2.jpg (67.39 KiB) Viewed 13934 times
[/img]in
feature-based prerequisites installs during main MSI install
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Ask User What To Install?

Hello,

Feature based prerequisites are practically prerequisites that are organised into features. You might choose to place other components under that feature, that will install along with that feature. For example, if you have .net assemblies, you might want to add those assemblies under the .NET prerequisite's feature. If the .NET prerequisite is already installed, the action would be skipped and the checkbox for the .NET prerequisite would be unchecked. Thus, the feature would not be installed, neither would the other components under it. Even though the components should be installed because .NET is present.

Let us know if you still need this behavior changed, and why.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”