How can you shutdown a harddrive ? i want to do this to be able to safely remove my sata drive even though it's hotplug. WMI does't seems to have the method.
+2
A:
Using WMI, you can get the 'eject drive' dialog to pop up using:
Shell "Rundll32.exe Shell32.dll Control_RunDLLA hotplug.dll", vbNormalFocus
Alternatively, if you want to programatically eject a device, you need this MSDN article. This should work with sata drives, if you can eject them manually then you'll be able to 'eject' them programatically.
gbjbaanb
2009-05-03 13:54:30
the msdn article is insteresting
CiNN
2009-05-03 14:05:02
This method has nothing to do with WMI -- it's just launching the safely remove hardware dialog.
Kasprzol
2009-05-03 17:36:27