Installation of Advanced Installer Fails

Having trouble running Advanced Installer? Got a bug to report? Post it all here.
Post Reply
nowiresmatt
Posts: 1
Joined: Fri Mar 01, 2019 1:20 am

Installation of Advanced Installer Fails

Post by nowiresmatt » Fri Mar 01, 2019 1:26 am

Trying to install advanced installer 15.7 for evaluation and it fails.... D'oh.

Installation is on Win10 Pro 1803 17134.590 with local admin rights.

All files copied but fails on creating a shortcut and the backs out removing everything installed.
Warning 1909. Could not create Shortcut Advanced Installer 15.7.lnk. Verify that the destination folder exists and that you can access it.

Next error message is:
Operation ixoShortcutPropertyCreate called out of sequence.

Can you please advise what the fault it.

Cheers

Catalin
Posts: 1214
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation of Advanced Installer Fails

Post by Catalin » Fri Mar 01, 2019 9:15 am

Hello and welcome to our forums.

This problem may appear if the "Enable Controlled folder access" policy setting is enabled on your machine. However, this setting prevents the installation of all the MSI packages that contain a desktop shortcut, not only the Advanced Installer package.

https://docs.microsoft.com/en-us/window ... loit-guard

Can you try to disable that setting and see if the installation works?

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

mindaugas
Posts: 5
Joined: Fri Apr 19, 2019 12:35 pm

Re: Installation of Advanced Installer Fails

Post by mindaugas » Fri Apr 19, 2019 12:39 pm

I have this problem as well. I noticed, that installer tries to create a shortcut under C:\Users\Public\Desktop folder, while it should create shortcut only under the user running the installer folder ( for example C:\Users\John\Desktop). Disabling Ransomware protection helps, but that is not an option, because more and more people will have this setting turned on.

Catalin
Posts: 1214
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation of Advanced Installer Fails

Post by Catalin » Mon Apr 22, 2019 9:30 am

Hello and welcome to Advanced Installer forums,

I am not quite sure I understand your scenario here. Do you mean that when you are trying to install Advanced Installer, the setup tries to create the shortcut under "C:\Users\Public\Desktop"? Or is it that a setup built with Advanced Installer has that behavior?

If it's the second case, could you please forward me a copy of the .AIP file by e-mail at support at advancedinstaller dot com so I can further investigate this issue?

Looking forward to hearing from you.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Catalin
Posts: 1214
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation of Advanced Installer Fails

Post by Catalin » Tue Apr 23, 2019 11:54 am

Hello Mindaugas,

First of all, thanks for the sent files.

Please keep in mind that this behavior is normal, due to the fact that your installation is of "Per-machine only (fails if user is not administrator" type (see "Install Parameters" page --> "Installation Options" section).

If you are trying to create a shortcut when the installation type is of "Per-machine only (fails if user is not administrator)", the shortcut will go under "..\Public\Desktop" so everyone who has access to the machine can access it (this is why it is called a per-machine installation).

If you want the shortcut to go under "..\<username>\Desktop", you can simply change the "Installation type" to "Per-user only".

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

mindaugas
Posts: 5
Joined: Fri Apr 19, 2019 12:35 pm

Re: Installation of Advanced Installer Fails

Post by mindaugas » Mon May 13, 2019 12:00 pm

Okay, looks like changing installation type to per-user solves this issue with ransomware protection. But there's a new issue.

Updating the app does not delete the previous version, because installation type changed from per-machine to per-user.

I've tried to use custom action "Uninstall previous versions", but that does work only when opening the installer over GUI mode. If you run silent update using /qb flags, Wizard Dialogs Stage is being skipped and custom action is not being invoked, because "Uninstall previous versions" only works when being placed at Wizard Dialogs Stage section.

Any idea how to remove the previous app version?

Catalin
Posts: 1214
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation of Advanced Installer Fails

Post by Catalin » Mon May 13, 2019 2:37 pm

Hello Mindaugas,

Indeed, the "Uninstall previous versions" custom action can not be used during the "Install Execution Stage".

This custom action is mainly used when you want your setup to uninstall an older setup which has a different install type. In your case, your installation type is of "Per-user" and your old installation is probably of "Per-machine" type.

However, after investigating this a bit more, I have come up with a workaround which will not have you changing the installation type of your package --> which will further lead in you being able to upgrade silently.

The workaround is as it follows: we will create a property based folder which will resolve to the following location:

[%UserProfile]\Desktop

The %userprofile% environment variable resolves to the following location:

C:\Users\<username>.

After doing so, we will redirect our shortcut to the earlier created property based folder.

Here are the steps which you can follow in order to achieve this:

1. please go to "Install Parameters" page and create the following property:

Name: USER_DESKTOP
Value: null


(the property name can be changed)

2. now please go to "Custom Actions" page and add a "SetProperty" custom action with sequence. In order to add a custom action with sequence, simply press the "Add custom action with sequence" button which is placed to the right side of the custom action's name.

The property must be scheduled between the "Searches" and "Paths Resolution" action groups and it could look like it follows:

Property: USER_DESKTOP
Value: [%UserProfile]\Desktop

Execution Time: Immediately

Uncheck the "Uninstall" and "Maintenance" options from under the "Dialogs Stage Condition"

This custom action should be shared between the two execution stages (Wizard Dialogs Stage and Install Execution Stage), in order for it to also execute during a silent installation. In order to share a property, all you have to do is to hold SHIFT + drag and drop the custom action under the "Install Execution Stage"

Please find attached a SetProperty custom action screenshot for your reference:
Capture.PNG
Capture.PNG (49.59 KiB) Viewed 322 times
3. now the last step is to create the property based folder and redirect the shortcut to it. Here is how you can proceed:

- please go to "Files and Folders" page

- right click on the "Application Folder" --> "New Folder" --> "Property Based" --> choose the earlier created property (USER_DESKTOP)

- now please redirect the shortcut to the earlier added property based folder - click on the .EXE file --> "New Shortcut To" button from the toolbar --> "Installed File" --> click on the "..." button that is located to the right side of the "Shortcut folder:" field --> choose the earlier created property based folder.

Now the shortcut will be created under the user's desktop folder and you should be able to successfully proceed in upgrading your product silently.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

mindaugas
Posts: 5
Joined: Fri Apr 19, 2019 12:35 pm

Re: Installation of Advanced Installer Fails

Post by mindaugas » Tue May 14, 2019 6:38 am

Hi, thanks for the quick answer!

However, I was not able to succeed with this approach, because after doing everything according to the steps you provided I get the error

Warning 1909. Could not create Shortcut xxx.lnk. Verify that the destination folder exists and that you can access it.

This happens only if ransomware protection is turned on.

Catalin
Posts: 1214
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation of Advanced Installer Fails

Post by Catalin » Tue May 14, 2019 9:11 am

Hello Mindaugas,

I would recommend trying to report this to your Antivirus vendor. Most likely, this is a false positive detection.

Please have a look on our "False positive virus detection" article which I think you may find useful.

Hope this helps somehow.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

mindaugas
Posts: 5
Joined: Fri Apr 19, 2019 12:35 pm

Re: Installation of Advanced Installer Fails

Post by mindaugas » Tue May 14, 2019 9:15 am

The thing is, I am not using any third-party antivirus systems on my computer. This happens when I turn on Controlled folder access on my windows security settings.

Catalin
Posts: 1214
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation of Advanced Installer Fails

Post by Catalin » Tue May 14, 2019 9:46 am

Hello Mindaugas,

Indeed, you are right, this may be encountered when you have the "Controlled folder access" option enabled as well. Please see my answer above about this.

The only thing I can think of right now is your privileges to the folder that you are trying to create the shortcut to. Have you tried running the setup as administrator? If you did so and that did not work, I am afraid I am not aware of any other workaround than disabling the above mentioned option.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

mindaugas
Posts: 5
Joined: Fri Apr 19, 2019 12:35 pm

Re: Installation of Advanced Installer Fails

Post by mindaugas » Tue May 14, 2019 10:12 am

Yes, I did try running the installer as administrator and it did not help. This is a really frustrating situation and I think there will be more and more people facing this issue because of Microsoft ransomware protection feature.

Catalin
Posts: 1214
Joined: Wed Jun 13, 2018 7:49 am

Re: Installation of Advanced Installer Fails

Post by Catalin » Fri May 17, 2019 3:14 pm

Hello Mindaugas,

It is unfortunate to hear that running the setup as administrator did not help.

Having a look on the "Enable controlled folder access" Microsoft article, at the bottom of the page I could see the following PowerShell cmdlet:

Code: Select all

Set-MpPreference -EnableControlledFolderAccess Enabled
This cmdlet is said to enable the "Controlled Folder Access" feature. On the other hand, by using the following cmdlet:

Code: Select all

Set-MpPreference -EnableControlledFolderAccess Disabled
The feature should be disabled. Both of the above cmdlets should be run from an elevated PowerShell session (run as administrator).

With that being said, I thought about the following approach:

We can maybe try to disable this feature before our shortcuts are created and then re-enable it after the shortcut is created. Both of these can be achieved through a custom action. Since the above solutions are both using PowerShell, you can try to achieve this through a "Run PowerShell inline script" custom action.

The custom action that disables the feature must be placed before the "CreateShortcuts" standard action and the custom action that enables it must be placed afterwards.

In order to schedule a custom action according to another one, in this case, the "CreateShortcuts" custom action, you can proceed as it follows:

- go to "Custom Actions" page

- right click on "Add Resources" action group --> "Show Standard Action" --> "Add Resources" --> click on "CreateShortcuts" standard action

That should display the custom action in the custom action's list. After doing so, simply drag and drop the above mentioned PowerShell custom actions accordingly.

Unfortunately, due to the high flow of tickets, I did not have time to test this, so please test it and let me know the outcome.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Post Reply