i want edit Registry key called \"usbstor\" value and this my code in update method
try
{
string path = baseRegistryKey + \"\\\\\" + Su
An alternative solution is to change the permissions on the registry key. Open the key using Regedit, right click and select 'Permissions'. Either add the profile that your application runs under (ie a service account) or select an existing group (ie Users) and grant them full access. This way you're not having to grant elevated privileges which is always a security concern.