2

Is it possible to detect, whether client system has specific windows application installed or not using Javascript?

I developed one website, which would have to detect the application, which was developed by us only. But I want to let you know, the website name and windows application names are different. I mean consider my web application name is X and windows application name is Y not like same as Skype webapplication and Skype windows application

Consider Skype, it has web application as well as windows application. As same as Skype doing the detection for windows application installation, can I also detect the software installed or not using Javascript.

I've gone through some StackOverflow questions

Get installed applications in a system

Check if the application is already installed

and some online articles

https://developers.google.com/web/updates/2017/04/getinstalledrelatedapps

https://www.codeproject.com/Questions/392194/How-can-I-check-if-a-program-is-installed-on-clien

https://social.msdn.microsoft.com/Forums/ie/en-US/1ae2d1f8-ac4a-4905-8bfd-705218b864e2/check-installed-application-using-javascript?forum=ieextensiondevelopment

and like below code

navigator.getInstalledRelatedApps().then(relatedApps => {
  for (let app of relatedApps) {
    console.log(app.platform);
    console.log(app.url);
    console.log(app.id);
  }
});

And want to let you know, I am using Angular 5

SE_net4 the downvoter
  • 21,043
  • 11
  • 69
  • 107
Sivakumar Tadisetti
  • 4,033
  • 5
  • 23
  • 51
  • 1
    Simple answer - no. – Reinstate Monica Cellio Aug 09 '18 at 09:42
  • Try look at https://stackoverflow.com/questions/9514179/how-to-find-the-operating-system-version-using-javascript – Martin Aug 09 '18 at 09:46
  • @Archer Thank you for your answer ;-). Instead of javascript can I use any other programming languages to detect. Consider `google maps`, when we open our application, it will ask for `This website is trying to access your current location`, in this way can we do like `This website is tyring to access your system installed softwares` – Sivakumar Tadisetti Aug 09 '18 at 09:50
  • @Martin Thank you for your response, but that will detect the client's software not the installed softwares – Sivakumar Tadisetti Aug 09 '18 at 09:51
  • Not if you want to do it in a browser. They don't have that level of access to the operating system, or browsers would be potentially the most dangerous piece of software available! – Reinstate Monica Cellio Aug 09 '18 at 09:51
  • @Archer `browsers would be potentially the most dangerous piece of software available!` Yeah that's correct ;-) – Sivakumar Tadisetti Aug 09 '18 at 09:52

1 Answers1

0

Using getInstalledRelatedApps() you can check if your Windows UWP app is installed on the users computer.

  1. Update your Windows UWP app to tell it about your website, which involves updating the Package.appxmanifest file.
<Applications>
  <Application Id="App" ... >
      ...
      <Extensions>
         <uap3:Extension Category="windows.appUriHandler">
          <uap3:AppUriHandler>
            <uap3:Host Name="example.com" />
          </uap3:AppUriHandler>
        </uap3:Extension>
      </Extensions>
  </Application>
</Applications>
  1. Update your website to tell it about your Windows UWP app by adding a windows-app-web-link file to your /.well-known/ directory on your web server.
[{
  "packageFamilyName": "MyApp_9jmtgj1pbbz6e",
  "paths": [ "*" ]
}]
  1. Update your web app manifest on your website with details of the Windows UWP app.
{
  "related_applications": [{
    "platform": "windows",
    "id": "MyApp_9jmtgj1pbbz6e!App",
  }]
}
  1. Call getInstalledRelatedApps() to check if your UWP app is installed:
const relatedApps = await navigator.getInstalledRelatedApps();
relatedApps.forEach((app) => {
  console.log(app.id, app.platform, app.url);
});
PeteLe
  • 1,161
  • 7
  • 16