Yes, but only with ActiveX. If you know VB or VC++ then it would be no problem at all. Check out one of the VB forums here, they are very good.
To the best of my knowledge, it is not possible to use the Windows API in straight HTML, or even js or vbscript. It's a security feature, really, because if you could, you could format someones harddrive, steal sensitive information, or lots of other dangerous little things, all before the page even loads, or by <BODY onLoad="vbscript:FormatHD()">
ActiveX can do it, because you need to set browser permission for an ActiveX control to work.
Kevin