[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Enable Write Caching for a Removable Drive (Programmatically)

Posted on 2011-05-09
3
Medium Priority
?
1,225 Views
Last Modified: 2012-05-11
Anyone have any idea how to programmatically enable write caching for a removable drive in windows 7 using .NET 2.0?

Equivalent of going to Computer Management -> Storage -> Disk Management -> Properties for a Removable drive -> Policies -> "Better Performance"


0
Comment
Question by:collages
3 Comments
 
LVL 2

Assisted Solution

by:ExpertHelp79
ExpertHelp79 earned 600 total points
ID: 35719861
You won't be able to do it now through managed calls in the framework.
Rather, you will have to call the APIs you would call in other environments
through the P/Invoke layer.


http://msdn.microsoft.com/en-us/library/aa375082%28VS.85%29.aspx
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2cc30a64-ea15-4661-8da4-55bbc145c30e&displaylang=en
0
 
LVL 14

Accepted Solution

by:
canali earned 1400 total points
ID: 35719904
One solution should be looking in the registry and change/create the UserRemovalPolicy=3 in
hklm\SYSTEM\CurrentControlSet\Enum\IDE


Look here the code is ni vbscript (but you can use the language you prefer)
 http://www.pcreview.co.uk/forums/wmi-script-issue-t2328822.html
0
 
LVL 1

Author Closing Comment

by:collages
ID: 35725198
Both of these are excellent answers and resources.
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month17 days, 18 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question