Sunday, July 12, 2009

Detect client's free harddrive space and memory from an INTERNET webpage? Example ActiveX code or Applet API?

I need to be able to detect the user's memory and hard drive space available via a public internet web page before I can allow them to download a file. This seems like it might be possible with a (code signed) Applet or ActiveX control (via WMI) or possibly WSH? This needs to work seemlessly to a non-techny type end-user -- so it seems reasonable to ask them to trust the code that will execute, but it would not be appropriate to tell them how to get this information on their own. The targetted users will be running Windows/ IE6-7 and possibly Firefox. I have tried some .NET C# code to call the ManagementClass, but have run into security issues - so if this is possible please provide sample code.





Please provide working sample code that can return status (possibly accessed through DOM and/or javascript) back to the webpage that will will work in above mentioned browsers on a PUBLIC INTERNET site. Also detail necessary configuration of component, web server (IIS 6.0), %26amp; filesys.

Detect client's free harddrive space and memory from an INTERNET webpage? Example ActiveX code or Applet API?
This will have to be an activex control or applet. Getting the free space is real easy once the doggone thing is executing. The real problem is that with all these browser viruses going around, NO ONE in their right mind is going to let you install an activex control if you're not on par (reputation wise) with Macromedia or similar. Same with the applet. Signed code will get you in a little easier, but most people (just like me) are gun shy after seven versions of IE still couldn't keep all the hacks out.





I could write the custom control in vb6 in 5 minutes, literally. Deploying it is another story.





WSH - forget about it.
Reply:Your site would get my vote - for sites not to ever visit again.





Give the user credit for having the intelligence to either make sure he has the space available, or the grace to accept the download blowing up in his face. With all the script-kiddies coming out of the woodwork, I have even my test machine locked down tight. Anyone who doesn't, these days, deserves the crash.


No comments:

Post a Comment