This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to detect USB hard disk as a removable disk
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 19, 2009
01:00 PM
How to detect USB hard disk as a removable disk
I am using GetDiskInfo to check the USB hard disk (which has about 1 TB in size).
Returned nDriveType is DRIVE_FIXED.
Is there a way to detect this USB disk is a removable disk?
Regards,
Qingsong
Returned nDriveType is DRIVE_FIXED.
Is there a way to detect this USB disk is a removable disk?
Regards,
Qingsong
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 19, 2009
05:32 PM
There isn't anything built in to InstallScript for this, however the documentation for the underlying Windows API call (GetDriveType) has some suggestions to use another API (SetupDiGetDeviceRegistryProperty). See http://msdn.microsoft.com/en-us/library/aa364939(VS.85).aspx to start your research. Note that calling this function from InstallScript may not be easy, so it may be more efficient to create your own C++ DLL which wraps the information you want more directly, and call into that DLL instead.
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)