ID0815
Posts: 1
Joined: Tue Sep 26, 2023 2:29 pm

Problem with creating MSI Installer

Hi there,

i bought an prof licence of advanced installer, and i made some progress but somehow its still not easy to create an msi installer for my needs.
And thats the reason why i wrote here a post, hopefully someone can answer my questions. Iam pretty new with that program so please dont be so hard on me :)

i checked already a lot of youtube videos and tried to work with the ebook but for some questions i did not found an answer yet.

General Info

My Product is divided into 4 Modules

Modul1 runs in CAD App 1 and need APPDIR1
Modul2 runs in CAD App1 and need APPDIR2
Modul3 runs in CAD App2 and need APPDIR2
Modul4 runs in CAD App1 and need APPDIR2

Depending on privileges the Modul2-4 (APPDIR2) needs to installed in Programdata/Autodesk/ApplicationsPlugins or AppData/Roaming/Autodesk/ApplicationsPlugins

Additionally i need different Builds so each Supplier has its own Modul1-4

Licences will be controlled by the UI itself inside the CAD App

But the Check for Updates functionality should be implemented in the UI as well. But for the updating mechanism i need to close the CAD App.

My Product needs also multilingual dialogs and multilingual EULA

Additionally the user should be able to choose a network path if they want to install modul1 to network

What i did/achieved so far (i started with Modul2)

i did some tests with Install Parameters, so i tried to choose installation type "per machine - if user..." the result is that the user can choose if they would like to install it for a user or a for all. But i did not found a way to modify the path they are looking for, so AI_UserProgramFiles is not the path it need. Therefore i created a new Property InstallPath, combined with a CustomAction where the condition is Privileged = 1 and accordung to that the Path should be modified.

Additionally i created a custom action detect process to check if CAD App 1 running, if so then a messagebox should pop up to tell the user that they need to close Cad App 1 before restart Installation -> and abort the current installationprocess.

i did also activate german an english in my translations section and created an own directionary to map the different EULA's for different language codes.

Now my questions

1. Is there are way to use installationtype per machine but modify the AI_UserProgramData path`?
2. to check the privileges as customaction, do i need to check in the Wizard Dialog Stage or in the Install Execution Stage? or Both?
3. When i press on run again to uninstall it, they remove all the files/folders at the correct locations but starts again a new isntallation dialog. Why is there no Dialog to remove the things and then its over?
4. What is the best way to achieve modul1,2 in the same installer? as far as i understood i need to create a parent suite installation file, and depending on the feature i choose the child installers will be executed? or ist there another way to do that?
5. To create different Brandings for different Supplier i need to create different builds is that correct?
6. How i can integrate the CheckUpdate Process in my own Ui which is running inside the CAD App?
7. According to my CAD APP it could be that a user have several versions of the cad apps intalled, how can i detect the last (highest version) trough registry?
8. How i can check if the CAD app is isntalled in specific version?
9. i would like to have another dialog for network installation.
10. Finally i think about to modify some SQL Lite DB's during installation, what is the best way to rollback during uninstallation? The issue there is, i cannot drop easy a table, because i need to make some records in exsiting tables. and the Uniqueid also not fixed.


I hope this will not overwhelming you, but i really checked before a lot of resources but its still not clear for me. I also checked about some Trainingbooks or Trainingcourses. but i think there is no available.

Best regards and thank you for your help.
Catalin
Posts: 7030
Joined: Wed Jun 13, 2018 7:49 am

Re: Problem with creating MSI Installer

Hello and welcome to our forums,
i bought an prof licence of advanced installer, and i made some progress but somehow its still not easy to create an msi installer for my needs.
And thats the reason why i wrote here a post, hopefully someone can answer my questions. Iam pretty new with that program so please dont be so hard on me :)
Welcome to the Advanced Installer family! :)

And no, we will definitely not be hard on you.

First of all, please accept my apologies for the quite delayed reply.

Thank you for the very detailed explanation - this is for sure helpful.
1. Is there are way to use installationtype per machine but modify the AI_UserProgramData path`?
There would be a way, but it would require the "Dialog Editor" feature, which is available starting with the Enterprise suite.

However, I would not advise changing that path.

Basically the AI_UserProgramData is a special property proprietary to us which is used to automatically change the path depending on the option selected in the InstallTypeDlg.
2. to check the privileges as customaction, do i need to check in the Wizard Dialog Stage or in the Install Execution Stage? or Both?
Not quite sure I understand this.

The installation process consists of two parts - client (Wizard Dialogs Stage) and server (Install Execution Stage).

The Wizard Dialogs Stage is basically when the dialogs are spawned and the Install Execution Stage starts when the "Install" button is pressed.

By default, the system is modified during the Install Execution Stage, this being the reason why you are asked for admin privileges when pressing the install button.

Otherwise, if you have a custom action that needs elevated privileges scheduled during the Wizard Dialogs Stage, we need to check the "Run as administrator" option so the client process will also be elevated.

If this does not help, please give me some more details so I can better assist.
3. When i press on run again to uninstall it, they remove all the files/folders at the correct locations but starts again a new installation dialog. Why is there no Dialog to remove the things and then its over?
Not quite sure I understand this. Could you please elaborate on this (perhaps create a GIF showcasing the behavior)?
4. What is the best way to achieve modul1,2 in the same installer? as far as i understood i need to create a parent suite installation file, and depending on the feature i choose the child installers will be executed? or ist there another way to do that?
This would indeed be on approach. Basically we create a parent installer which will install the required module as per user's selection.

How to conditionally install a prerequisite based on the user selection?
5. To create different Brandings for different Supplier i need to create different builds is that correct?
Not quite sure what you mean by different brandings here. If you'd like to create a custom project for one of your customers, you could use the "Save as Template" option and then start from the template project to create the custom one.
6. How i can integrate the CheckUpdate Process in my own Ui which is running inside the CAD App?
This should be quite easy, as everything is done through the updater.exe tool.

You would need to launch, from within your app, the updater.exe tool with the appropriate command line.

How to integrate the Advanced Updater with my application
7. According to my CAD APP it could be that a user have several versions of the cad apps intalled, how can i detect the last (highest version) trough registry?
I'm afraid I can't really tell you that.

If you have that information on your end, you could use it to create a Registry Search.
8. How i can check if the CAD app is isntalled in specific version?
Same as above, I would need to know more info about the product to be able to help.

This is mostly up to the package developer to declare how that is done.
9. i would like to have another dialog for network installation.
I'm afraid this would also require the Dialog Editor feature, which is available starting with the Enterprise suite.
10. Finally i think about to modify some SQL Lite DB's during installation, what is the best way to rollback during uninstallation? The issue there is, i cannot drop easy a table, because i need to make some records in exsiting tables. and the Uniqueid also not fixed.
The predefined SQL support is also available starting with the Enterprise suite.

However, if you want to do it custom on your end - e.g. through a Custom Action - then the rollback would need to be done through a Custom Action as well.

For instance, let's say we have a Custom Action that copies 3 files.

- it copies first file

- copies the second file

- when copying the third file, it fails

What we would need here is a custom action that would cleanup first and second file (basically rollback the modifications).

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”