0

As per the title, how do I set the application id of a native Windows desktop application?

Documentation on Application Id's is sparse and I haven't found anything about setting it.

There is this Microsoft Docs but this mentions what it is and how to use AppUserModelId's

I am using Inno Setup Compiler to create an installer for my desktop application and I have set the flag AppId to a GUID generated by Inno Setup Compiler.

AppId={{6BE5E5E6-68BF-4AF7-A9E5-FF919709E86C}

My understanding is that Inno Setup will set up the AppId when you are running the installer, but when I run this PowerShell snippet, I am unable to find my application after installation (this snippet shows the AppId as IdentifyingNumber):

get-wmiobject Win32_Product -Filter "Name LIKE 'MyApp%'"

Everything works as expected in my application though. It starts up and everything, but I need the AppId to be set in order for my toast notifications to work correctly (via wxWidgets).

Edit:

What I was actually after was AppUserModelId and not AppId which is what was even mentioned in my question here, ironically.

2nd Edit:

I've learnt that the AppId is a Inno Setup specific thing and not anything to do with Windows. As mentioned in my previous edit, what I was actually looking for is the AppUserModelId and my issue became more clear which has been put into this question.

I find it interesting regardless that some applications I can query with the Powershell snippet and I get results back, but for my application I get no result

  • Where are you looking in the registry for your `AddId`? – Andrew Truckle Apr 12 '20 at 16:42
  • You are searching for `{....}` right? And not `{{...}`? The script inserts two `{{` so that you end up with one since `{` by itself is a special character in the script file. – Andrew Truckle Apr 12 '20 at 16:44
  • @AndrewTruckle I was looking in this path: `HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppID\MyApp`, but it doesn't exist there. Path from here: https://learn.microsoft.com/en-us/windows/win32/com/appid Yes, I am looking for `{...}` – segmentation_fault Apr 12 '20 at 17:09
  • If you read that link again you will see: *Docs/Windows/Component Object Model (COM)/ COM/Fundamentals/Reference/Registry Entries/HKEY_LOCAL_MACHINE_SOFTWARE\Classes/AppID Key/AppID*. That key is all to do with a com server application. So as I mentioned in a comment to my answer you have to use regsvr to register your com application. You have not stated if yours is such a application. – Andrew Truckle Apr 12 '20 at 17:48
  • Yes, my bad. I did not see I was looking at the wrong documentation – segmentation_fault Apr 12 '20 at 18:28
  • Inno Setup `AppId` has nothing to do with *"toast notifications"*. You are on a wrong track. This looks like [XY problem](https://meta.stackexchange.com/q/66377/218578). – Martin Prikryl Apr 13 '20 at 10:10
  • @MartinPrikryl Yes, you are right. What I was actually after was `AppUserModelId` which I even mentioned in my post – segmentation_fault Apr 13 '20 at 12:19
  • So please remove all reference to `AppId` and rephrase your question. + Are you aware of [`AppUserModelID` parameter is `[Icons]` section](https://jrsoftware.org/ishelp/index.php?topic=iconssection&anchor=AppUserModelID)? – Martin Prikryl Apr 13 '20 at 12:25
  • 1
    Yes, I've added it. But now I'm getting issues coming from wxWidgets when setting up notifications. As far as I know this is still tied to my issues with `AppUserModelId`. I think I'll rather create a new question – segmentation_fault Apr 13 '20 at 12:42

1 Answers1

0

According to the documentation for AppID it states:

AppId also determines the actual name of the Uninstall registry key, to which Inno Setup tacks on "_is1" at the end. (Therefore, if AppId is "MyProgram", the key will be named "MyProgram_is1".)

In your case the registry key will be: {6BE5E5E6-68BF-4AF7-A9E5-FF919709E86C}_is1

On my computer the uninstall registry keys are here:

   HKEY_LOCAL_MACHINE\
             SOFTWARE\
          WOW6432Node\
            Microsoft\
              Windows\
        CurrentVersion\Uninstall\{...}_is1

It has two registry keys stating the location of the software:

  • InstallLocation
  • Inno Setup: App Path

But it does not appear to state the name of the executable. But you would know that anyway.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
  • 1
    I've found it under the location you posted there. But why cannot I query the `AppId` using that powershell snippet unlike other applications which do return a value for that? That would indicate that Inno Setup did not correctly set the AppId of my application or I missed a step? – segmentation_fault Apr 12 '20 at 17:14
  • I thought that area was used for software where you register them with regasm or regsvr. I am not really sure. – Andrew Truckle Apr 12 '20 at 17:16