Michael513
Posts: 5
Joined: Sat Sep 14, 2019 9:47 pm

Error calling MSI API: 1627 Method - 2019

hi, every time I try to build my project, I get this message
Image
how do I fix it? and what caused it? thanks
Attachments
project.aip
(72.59 KiB) Downloaded 190 times
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Error calling MSI API: 1627 Method - 2019

Hello Michael and welcome to Advanced Installer forums,

The problem was caused by some duplicate entries in the "ControlCondition" table.

Please find attached the fixed project:
project - Fixed.aip
(72.42 KiB) Downloaded 216 times
The duplicates can be seen in the "Dialogs" page --> "InstallDlg" --> click on the "Next" button --> under "Control Conditions" tab, you can see that each of your control condition is duplicated (Show, Disable, Enable).

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Michael513
Posts: 5
Joined: Sat Sep 14, 2019 9:47 pm

Re: Error calling MSI API: 1627 Method - 2019

thank you for fixing the issue, I had another issue with the project, which is the frame
Image
the frame just... looks weird, so how may I fix it?
thanks for helping!
Attachments
project 2.aip
(30.7 KiB) Downloaded 198 times
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Error calling MSI API: 1627 Method - 2019

Hello Michael,

You are always welcome.

In what regards the second issue, this might happen due to the fact that you have only the "Arabic (Saudi Arabia)" language selected in the "Translations" page.

Could you please change that to "English", rebuild the project and let me know if it helps?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Michael513
Posts: 5
Joined: Sat Sep 14, 2019 9:47 pm

Re: Error calling MSI API: 1627 Method - 2019

surprisingly enough, changing a language... fixes... the issue!?
I mean why is this even a thing? why I can't just use another language rather than English?
or is this just some sort of issue that will be sorted out in later versions/updates?
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Error calling MSI API: 1627 Method - 2019

Hello Michael,

The problem here consists in the fact that the project strings are not localized (translated) and your package is in the Arabic language.

The controls are reversed because that is how the Arabic language is (the writing is happening from right to left).

However, since the strings are not translated, the dialogs look indeed really off.
I can't just use another language rather than English?
You can try any other language from the predefined list and you will see that the dialogs will look just fine.

If you are interested in translating the project strings to Arabic language, please have a look on our "Translating and using a new language" article.

Additionally, you can have a look on the "Localized Strings" article as well.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Michael513
Posts: 5
Joined: Sat Sep 14, 2019 9:47 pm

Re: Error calling MSI API: 1627 Method - 2019

thanks for clarifying that,

I got one last question if it's okay; it's about backing up original files before install and restoring them after uninstall
I followed this tutorial, and it worked just fine.

when I implemented that to my project, it didn't work, the backup works, but not the restore,
after spending days testing and trying to figure out what's the problem, I finally did this afternoon, and simply it's because the original files have identical names as the new ones, and when changing the name of one of the two files it works.

I've attached the project .aip file with some empty files to simulate the issue.
Backup Project.zip
(7.63 KiB) Downloaded 207 times

also in this quide, I didn't quite understand the meaning of this sentence:
Source File>Name>The name of the file to be copied/moved. Use wildcard patterns to copy/move multiple files.
as in the Backup Project.zip, there are two files, how can I put both of them in copy and move dialog?

*btw I tried to follow this tutorial, but didn't know how to properly create a new registry in the search page, so I just skipped it/i]
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Error calling MSI API: 1627 Method - 2019

Hello Michael,

You are always welcome.
I got one last question if it's okay;
Sure thing.
and simply it's because the original files have identical names as the new ones, and when changing the name of one of the two files it works.
Indeed, this is the intended behavior.
also in this guide, I didn't quite understand the meaning of this sentence:
In software, a wildcard character is a kind of placeholder represented by a single character, such as an asterisk (*), which can be interpreted as a number of literal characters or an empty string. It is often used in file searches so the full name need not be typed.

For instance, let's say that you have, in a folder, two .txt files and 1 .exe file, like this:

1.txt
2.txt
3.exe

In this case, if you want to copy/move only the .txt files, your "File Copy/Move" operation can look like this:

Source File:
Name: *.txt
Folder: the folder where they are placed

Destination File:
Name: empty
Folder: APPDIR


The above operation will only move the two .txt files. Basically, the asterisk (*) replaces 1 or more character. The logic behind this is that it will copy/move "anyString.txt".
*btw I tried to follow this tutorial, but didn't know how to properly create a new registry in the search page, so I just skipped it/i]
In order to create a registry search, you can proceed as it follows:

- go to "Search" page

- right click --> "New Search"

- right click on the newly created search --> "Add Search location" --> "Registry"

In the end, it should look like this:
Annotation 2019-09-26 173829.png
Annotation 2019-09-26 173829.png (22.32 KiB) Viewed 5512 times
There, you can configure your search.

The value of the search will be saved in the "RESULT_PROPERTY" property.

Hope this helps.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Michael513
Posts: 5
Joined: Sat Sep 14, 2019 9:47 pm

Re: Error calling MSI API: 1627 Method - 2019

The logic behind this is that it will copy/move "anyString.txt".
I see, but for example, if I have
1.txt, 2.txt, 3.txt, 4.exe
and I want to copy/move only 1.txt and 2.txt, I can't do that in one file operation, am I right?
Indeed, this is the intended behavior.
sorry, I forgot to put the question properly, how do I workaround this? or it just won't work using this method?
behavior
yes, this is where I ended up when I tried but... Eusebiu didn't quite explain what to put in the "key", "root", "type" fields which are visible your screenshot, and this is why I skipped the whole tutorial.
- these fields might be well known to what to put in them, but I just don't work with "Registry" at all.
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Error calling MSI API: 1627 Method - 2019

Hello Michael,
and I want to copy/move only 1.txt and 2.txt, I can't do that in one file operation, am I right?
As far as I have tried, I am afraid this is not possible with our predefined support. However, this can still be achieved through a custom action. For instance, you can create a script / .DLL file which can use regular expressions to match your needed files and then copy them in the desired location.
sorry, I forgot to put the question properly, how do I workaround this? or it just won't work using this method?
I am afraid I am not aware of any workaround for this.
yes, this is where I ended up when I tried but... Eusebiu didn't quite explain what to put in the "key", "root", "type" fields which are visible your screenshot, and this is why I skipped the whole tutorial.
No worries, I can explain it to you. Basically, every setup created with Advanced Installer creates a "Path" value. This can be found at the following location:

- WIN + R button combination

- type "regedit.exe"

- HKLM:\SOFTWARE\<Manufacturer>\<Product_Name>

For instance, if the publisher name is set to "Your Company" and the application name is set to "Your Application", the above path will become:

HKLM:\SOFTWARE\Your Company\Your Application

Additionally, if you are installing a 32-bit package on a 64-bit machine, the path becomes:

HKLM:\SOFTWARE\WOW6432Node\Your Company\Your Application

With that being said, simply use the picker ("..." button from the right side of the "Key" field) and navigate to the value that you need to find.

Hope this helps.

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

Return to “Common Problems”