user4680856
user4680856

Reputation:

How to check user preinstalled applications on their machine ?

I want to make a small landing page to diagnose all the requirements.

I want to to check if my user machine have :

What is the best practice to build and check something like that ?

Is there any consideration that I need to keep in mind ?

Is there any tool outthere right now, that provide this kind of features already ?

I hope someone can at least point me to the right direction.

Thank-You.

Upvotes: 0

Views: 59

Answers (2)

adeneo
adeneo

Reputation: 318342

Should be straight forward, to notify a user that javascript is disabled you can use the noscript tags.

Of course there's no way to run javascript if it's disabled, so the rest of the checks will fail.

To check for installed plugins, you check navigator.plugins

var checkfor = {
    'Shockwave Flash' : false,
    'Adobe Acrobat'   : false
};

[].slice.call(navigator.plugins).forEach(function(x) {
    if (x.name in checkfor) checkfor[x.name] = true;
});


var p = document.createElement('p');
p.innerHTML = 'JavaScript is enabled';
document.body.appendChild(p);

for (var key in checkfor) {
    if ( checkfor[key] ) {
        var p = document.createElement('p');
        p.innerHTML = key + ' is installed';
        document.body.appendChild(p);
    }
}

FIDDLE

Upvotes: 1

Hayden Schiff
Hayden Schiff

Reputation: 3330

You can show a message to the user if JavaScript isn't enabled using the noscript tag in HTML. And this answer shows how you can show something else if Flash is disabled/missing.

But there's no way to detect presence of Adobe Reader. Historically, it was common to just include a download button for Adobe Reader, but nowadays, PDFs are so universal that you can usually assume the user has a program on their computer that can handle them.

Upvotes: 1

Related Questions