Scalerow
Posts: 1
Joined: Thu Oct 11, 2018 1:30 pm

Windows 10 toasts - CLSID and AMUID

Thu Oct 11, 2018 1:35 pm

Hi,

I've been struggeling for far to many hours now, so have to ask; how do i add clsid and amuid to a shortcut?
Found this in another post, guess this works for the amuid, but apperantly not for com clsid?

- Go to "Files and Folders" page and create a shortcut to an installed file (e.g. MyShortcutName).
- In the "Edit Shortcut Properties" dialog enable "Disable Pin to Taskbar" option.
- Go to "Table Editor" page, select "MsiShortcutProperty" table and add a new row like this:
MsiShortcutProperty: unique_key
Shortcut_: MyShortcutName
PropertyKey: System.AppUserModel.ID
PropVariantValue: desired value

The instructions on technet says this;

If you're using WiX for your installer, edit the Product.wxs file to add the two shortcut properties to your Start menu shortcut as seen below. Be sure that your GUID from step #4 is enclosed in {} as seen below.

Product.wxs
-----------------------
XML
----------------------
<Shortcut Id="ApplicationStartMenuShortcut" Name="Wix Sample" Description="Wix Sample" Target="[INSTALLFOLDER]WixSample.exe" WorkingDirectory="INSTALLFOLDER">

<!--AUMID-->
<ShortcutProperty Key="System.AppUserModel.ID" Value="YourCompany.YourApp"/>

<!--COM CLSID-->
<ShortcutProperty Key="System.AppUserModel.ToastActivatorCLSID" Value="{replaced-with-your-guid-C173E6ADF0C3}"/>

</Shortcut>


It doesnt seem possible to exactly that in Advanced Installer, so I'm hoping you can help me come up with a solution:)

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Windows 10 toasts - CLSID and AMUID

Mon Oct 22, 2018 3:51 pm

Hello and welcome to our forums,

You can try to use the following approach:

1. Go to "Table Editor" page and using the [Add Table] toolbar button add the "MsiShortcutProperty" table
2. select "MsiShortcutProperty" table and add a new row like this:
  • MsiShortcutProperty: unique_key
    Shortcut_: MyShortcutName
    PropertyKey: System.AppUserModel.ID
    PropVariantValue: desired value
3. add a new row like this:
  • MsiShortcutProperty: unique_key
    Shortcut_: MyShortcutName
    PropertyKey: System.AppUserModel.ToastActivatorCLSID
    PropVariantValue: desired value
- Build and run your project.

Hope this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

phillip.byram
Posts: 3
Joined: Mon Jul 22, 2019 7:58 pm

Re: Windows 10 toasts - CLSID and AMUID

Tue Jul 23, 2019 4:27 pm

I am attempting to add a CLSID and a AUMID for my application shortcuts in order to leverage action center Toasts as well. I have followed the solution provided using Advanced Installer 16.1, which resulted in this additional section in my .aip:

Code: Select all

  <COMPONENT cid="caphyon.advinst.custcomp.MsiShortcutPropertyComponent">
    <ROW MsiShortcutProperty="CompanyAlertsAppId" Shortcut_="CompanyAlerts" PropertyKey="System.AppUserModel.ID" PropVariantValue="Company.Comm.Alerts"/>
    <ROW MsiShortcutProperty="CompanyAlertsToastActivatorCLSID" Shortcut_="CompanyAlerts" PropertyKey="System.AppUserModel.ToastActivatorCLSID" PropVariantValue="{8B5A4D9E-200D-4868-8F92-005B142FC41B}"/>
  </COMPONENT>
However after I install my application, (based on results from Powershell> Get-StartApps) it looks like my AppUserModelID is defaulting to the absolute path to the executable file, instead of "Company.Comm.Alerts".
According to https://docs.microsoft.com/en-us/window ... ell/appids my chosen AppUserModelID is of the correct form.
I am getting this behavior consistently on multiple machines.

My application is WPF C# with a UWP nuget package for notification Toasts (if that matters).

I saw this article https://www.advancedinstaller.com/micro ... pdate.html that mentions
Custom "App User Model ID" not supported.
I am not making a desktop bridge application, as I don't want my application to be available in the Windows Store, so I don't think that applies.

What are the reasons Advanced Installer would not populate the AppUserModelID propertyValue for my application Shortcut?
Thank you for your help!

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Windows 10 toasts - CLSID and AMUID

Thu Jul 25, 2019 10:45 am

Hello Phillip,

As I can see in the setup project you sent us it seems you are setting the System.AppUserModel.ID flag only for your desktop shortcut. Please keep in mind that the "Get-StartApps" cmdlet returns the app ids only for the start menu shortcuts.

So, could you please set the System.AppUserModel.ID flag for your start menu shortcut too and then rebuild and test again the setup?

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

phillip.byram
Posts: 3
Joined: Mon Jul 22, 2019 7:58 pm

Re: Windows 10 toasts - CLSID and AMUID

Thu Jul 25, 2019 9:35 pm

Daniel, thank you!
This was the solution to my problem.

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

Re: Windows 10 toasts - CLSID and AMUID

Fri Jul 26, 2019 8:40 am

You are always welcome, Phillip.

We are glad you got this working.

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

themuffinman2000
Posts: 5
Joined: Thu Feb 27, 2020 12:25 am

Re: Windows 10 toasts - CLSID and AMUID

Thu Feb 27, 2020 12:29 am

I'm also trying to get the toast notifications for desktop apps working based on this link https://docs.microsoft.com/en-us/window ... st-desktop

I've added the properties to the table as suggested, but no idea how to verify if they are actually working. I used the Wizard in the Files and Folders section to create a Start Menu shortcut.

The Shortcut_ in the Table Editor row matches the name of my Shortcut under Start Menu folder.

How can I verify in Windows that the shortcut is registered with the properties I set?

themuffinman2000
Posts: 5
Joined: Thu Feb 27, 2020 12:25 am

Re: Windows 10 toasts - CLSID and AMUID

Thu Feb 27, 2020 1:14 am

Okay I was able to run a powershell script to view my shortcuts AMUID. Whatever I've done in AdvancedInstaller is not working as the AMUID that is being generated is a guid followed by a path to the exe. How can I share my project?

themuffinman2000
Posts: 5
Joined: Thu Feb 27, 2020 12:25 am

Re: Windows 10 toasts - CLSID and AMUID

Thu Feb 27, 2020 6:00 pm

Screen shots of what I have. What am I doing wrong?

Image

Image

themuffinman2000
Posts: 5
Joined: Thu Feb 27, 2020 12:25 am

Re: Windows 10 toasts - CLSID and AMUID

Thu Feb 27, 2020 6:19 pm

Ok I got it figured out. The shortcut name can't contain any spaces. Once I renamed the shortcut OCNotifications and updated the table reference it worked. This wasn't apparent from the UI.

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

Re: Windows 10 toasts - CLSID and AMUID

Fri Feb 28, 2020 1:31 pm

Hello and welcome to Advanced Installer forums,

First of all, thank you for your followup on this and for sharing your solution with us.

I am glad you got this working.

Indeed, as you have mentioned, a shortcut name can not contain spaces. In the "Shortcut Table" article, we can see that the "Name" field is of "Filename" type, which does not accept spaces.

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

themuffinman2000
Posts: 5
Joined: Thu Feb 27, 2020 12:25 am

Re: Windows 10 toasts - CLSID and AMUID

Mon Mar 09, 2020 10:57 pm

So what is utterly confusing and not explained in this thread or in the documentation is how the created shortcut and the Table entries map together.

If you look in the setup project file xml you'll see that when you create the shortcut it uses a hidden Shortcut="[Initial Name]". This is the value you use in the _Shortcut property of the table rows. If you change the name of the shortcut in the UI to a long version, the Initial Name does not change, but it also is NOT visible in the editor. So what ends up happening is you rip your hair out trying to figure out why the Table props aren't being written to the shortcut after you edit the name.

You have to agree that is super confusing.

Additionally, when you type in a long name for shortcut Advanced installer is storing the short and long version as defined by the Microsoft docs, but that isn't exposed in the UI. Might be nice to at least see it as some uneditable text.

Image

As you can see OCNotifications is nowhere to be found on the UI.

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Windows 10 toasts - CLSID and AMUID

Tue Mar 17, 2020 7:54 am

Hi,

I agree with you this is confusing and configuring those settings is quite complicated, but the reason for this is because we do not have support in our UI for those shortcut properties.

The only support to tweak those advanced settings we offer in UI is within "Table Editor" page by manually editing the "MsiShortcutProperty" table.

Also we do not have any available doc about how to edit such settings directly in the xml content of our AIP project file, and we strongly recommend our customers to avoid editing the AIP XML content outside of Advanced Installer app (e.g. editing its content in a text editor).

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

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

Re: Windows 10 toasts - CLSID and AMUID

Thu Apr 28, 2022 4:31 pm

Hello,

This improvement has been added in version 19.4 of Advanced Installer, released on April 26th, 2022.

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

Return to “Common Problems”