This content has been marked as final. Show 8 replies
The product GUID changes for each version of your application, but the upgrade GUID remains stable. The recommended way to determine if the application is installed is to query MSI for the presence of the upgrade GUID.
We are able to use the upgrade GUID to determine if MyApp is currently installed.
Now that I know it is installed, is there a way to know where? Generally it would be in Program Files / MyApp (if I understand correctly). But it is possible for the user to change the install directory during the install. So can I find out "for sure" where it is? ie MyApp.exe?
Thanks so much for your help!
Yes, you can do this to. The GUID of the MSI component containing the main executable (MyApp.exe) always matches upgrade GUID. You can use this to ask MSI where that component is installed.
So let me understand this. You are saying that AIR is using the same GUID for the ComponentCode (of the main executable) and the UpgradeCode?
If so, are these normal GIUDs with braces and hyphens, without braces and hyphens, or shuffled (without braces and hyphens)?
What is the preferred method for obtaining these GUIDs? Do I reverse-engineer the GUIDs from searching the registry, or are these GUIDs in the source code of the AIR app?
[Sorry, I'm an MSI guy and not an AIR guy--yet.]
Can you help here, too?
That's right: the UpgradeCode and (main executable) ComponentCode are identical and stable across updates to your application.
Whether or not you need braces or the "compressed" form of the GUID depends on where you're using them, per normal MSI rules (or nuttiness, depending on your point of view).
Most developers interested in this topic are building a native installer that also installs their AIR application, and have therefore signed up to redistribute the runtime. If you do that, you get documentation that covers this as well as a utility application that, given your application ID and publisher ID, generates the UpgradeCode for you. That's the peferred method.
That said, since the GUIDs are stable, you can also just pick them up from the registry once the application is installed. They are not present anywhere in the .air file itself.
Just to explain why these questions are coming up is that we are actually installing a Windows companion application that's looking to see if the AIR app is installed (and simplify the install of the AIR app if it isn't there).
I certrainly appreciate your help on this.