pkumar37
Level 3

Detect MSI GUID In Running Apps

Hello,

Is it possible to detect GUID of the MSI in running  Application.exe . Which gets installed through installshield

Labels (1)
0 Kudos
4 Replies
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

An MSI will have lots of different GUID's associated with it such as: Product Code, Upgrade Code, Package Code, Component GUIDs etc.

Each one of these will be stored in a Windows Property - I'm not sure how (or why) you want to detect the GUID whilst the installer is running however you will be able to access them by calling the relevant property that stores the GUID you want.
For example the Proct Code GUID is stored in the property PRODUCTCODE:

https://docs.microsoft.com/en-us/windows/win32/msi/productcode

hope this helps...

0 Kudos

I was looking particular  GUID as during uninstall i want to check if the running process is associated with particular version of application. As i can have multiple version of same application with different GUID.
I used different approach in place of GUID. 
Thanks for quick reply .

0 Kudos
pkumar37
Level 3

Actually my ask was if my application is installed successfully. Now i am running my application.  So is it possible for me to get the MSI guid through my application.

0 Kudos
shunt
Revenera Moderator Revenera Moderator
Revenera Moderator

The following VB script returns all MSI Product Names along with their ProductCodes - you could modify it yourself to achieve what you need - and then have your application run it when it starts for the first time:

https://github.com/glytzhkof/all/blob/master/MsiRetrieveProductCode.vbs

0 Kudos