I want to get the puter name using jquery. I tried using ActiveX Object but it will only run on IE browser. Is there is another way to get the puter name using jquery. I tried that code.
var network = new ActiveXObject('WScript.Network');
alert(networkputerName);
Can u any one help me..
I want to get the puter name using jquery. I tried using ActiveX Object but it will only run on IE browser. Is there is another way to get the puter name using jquery. I tried that code.
var network = new ActiveXObject('WScript.Network');
alert(network.puterName);
Can u any one help me..
Share Improve this question asked Oct 10, 2017 at 3:52 user2979432user2979432 831 gold badge2 silver badges7 bronze badges 6- Even on that navigator it will probably be blocked on mostly puters. I don't think you would get that information without client extended code. Also define what you expect by puter name, host name, Wins name, etc. – Diego C Nascimento Commented Oct 10, 2017 at 3:59
- 2 no, there is no way a browser can access the underlying operating system like that at all – Jaromanda X Commented Oct 10, 2017 at 4:00
- @guest271314 cleary if the user is already showing a solution for IE he is not working on a Firefox/Chrome extension. – Samuel Neff Commented Oct 10, 2017 at 4:14
- @SamuelNeff You are ignoring "I tried using ActiveX Object but it will only run on IE browser." OP is asking how the procedure can be acplished, and used ie as an example of a browser accessing the local filesysystem or a shell. – guest271314 Commented Oct 10, 2017 at 4:16
-
@SamuelNeff
NativeMessaging
is available at edge browser learn.microsoft./en-us/microsoft-edge/extensions/guides/… – guest271314 Commented Oct 10, 2017 at 4:44
2 Answers
Reset to default 3You can't. This information is not available to web sites.
The ActiveX approach outlined in your question won't even work in current versions of Internet Explorer, as the WScript.Network
ActiveX object is not marked as safe for scripting.
Is there is another way to get the puter name
You can utilize NativeMessaging
to achieve requirement at Firefox and Chromium, Chrome.