'Getting the path to an installed application on windows within node.js

My question is pretty code agnostic although I would like to implement it in node.js. I would like to be able to get the path to the TigerVNC Viewer exe file installed on the system.

Once installed, TigerVNC viewer gets listed in the startup menu of windows and I was hoping to be able to check all these links for one matching "TigerVNC Viewer" which is the link name and hopefully accessing the linked exe but I do not know how to implement that.

The other solution I figured out was to check the subdirectories "Program Files" and "Program Files(x86)" (as defined in the environment variables ProgramFiles and ProgramFiles(x86)) for a subdirectory TigerVNC because this is where the program gets installed.

What would be the best way to adress this problem in your opinion?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source