How to change registry values using c# (Removing USB Write Protection)


hello experts here ,

i planning build console app remove write protection on usb ports.. here code wrote remove write protection using registry editor code doesn't work..

can any1 correct code me ...

thanks reading...

"system.diagnostics.process.start("regedit","[hkey_local_machine\\system\\currentcontrolset\\control\\storagedevicepolicies]writeprotect=dword:00000000"); "


something this?

microsoft.win32.registry.setvalue("hkey_local_machine\\system\\currentcontrolset\\control\\storagedevicepolicies", "writeprotect", 0, microsoft.win32.registryvaluekind.dword);

try, not able test right now...

more info at http://msdn.microsoft.com/en-us/library/3dwk5axy.aspx


if (helpful) vote();



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Azure DocumentDB Owner resource does not exist

job syspolicy_purge_history job fail in sqlserver 2008

Trying to register with public marketplace error with 'Get-AzureStackStampInformation'