Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Friends,
I am using C#.net ,asp.net and .net framework 2.
How to get the serial number of the hard disk of the client system using javascript?

Thanks in advance,
George
Posted

serial number of the hard disk of the client system using javascript
While working on a ASP.NET application, any code on server side would be of webserver. JavaScript is a client side scripting language that might help. In order to get/interact with client system, either you need to use ActiveX control or jump on to Silverlight.

Pick the one that suits you. With ActiveX you will have certain security things to handle and it will be only IE specific. If needed, articles on ActiveX is present here at CodeProject.
 
Share this answer
 
v2
Comments
#realJSOP 17-May-11 10:13am    
I don't think you can do it with silverlight because you can't add a reference to system.management in a silverlight module. Anybody with half a brain in their head would mrefuse to allow Active-Xcrement to ruin on their machien. Besides that, IE is the only browser that allows Active-XCrement.
Sandeep Mewara 17-May-11 10:25am    
Thanks for reminding me of the only-IE thingy for ActiveX, forgot to mention that.

About, System.Management thing, good to learn. Thanks! So, just to add on, will the COM interoperability be an option here? I think, it can be, any idea?
You can use WMI.

I found this with a google search:

http://www.htmlforums.com/client-side-scripting/t-using-wmi-with-javascript-123787.html[^]

that returned over 920,000 results using this search phrase

javascript wmi[^]
 
Share this answer
 
Comments
Sandeep Mewara 17-May-11 10:27am    
So, we are talking of ActiveXObjects here, right?
Uros Calakovic 17-May-11 14:27pm    
That link is related to HTAs. WMI scripting objects are not marked as safe for scripting, so there is a good chance that GetObject / new ActiveXObject will fail.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900