D
Dhananjay
Hi All,
I have created one VSTo COM - addin for office 2007 in vb.net 2005. I
have seen that my code is not working if I access the
hkey_Classes_Root or hkey_local_machine through my code on windows
VISTA. My code is working fine on all OS except VISTA. I have access
to localmachine & classes_root since I can manipulate these keys
manually.
My code snippet for modifying HKEY_CLASSES_ROOT is as follows -
------------------------------------------------------------------------------------------------
Dim rk As Microsoft.Win32.RegistryKey
rk = Microsoft.Win32.Registry.ClassesRoot
With rk
.CreateSubKey(".asi",
Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree)
<-------------- Error starting from this line
.OpenSubKey(".asi", True).SetValue("", "ASI.Document",
Microsoft.Win32.RegistryValueKind.String)
.CreateSubKey("ASI.Document\shell\open\command")
End With
------------------------------------------------------------------------------------------------
My user account is Administrator.
Also my trace file (trace.txt) is not generated if my app's directory
is under "program files". If my app's directory is not in "Program
files", then creation of trace file is working fine!
Thanks,
Dhananjay
I have created one VSTo COM - addin for office 2007 in vb.net 2005. I
have seen that my code is not working if I access the
hkey_Classes_Root or hkey_local_machine through my code on windows
VISTA. My code is working fine on all OS except VISTA. I have access
to localmachine & classes_root since I can manipulate these keys
manually.
My code snippet for modifying HKEY_CLASSES_ROOT is as follows -
------------------------------------------------------------------------------------------------
Dim rk As Microsoft.Win32.RegistryKey
rk = Microsoft.Win32.Registry.ClassesRoot
With rk
.CreateSubKey(".asi",
Microsoft.Win32.RegistryKeyPermissionCheck.ReadWriteSubTree)
<-------------- Error starting from this line
.OpenSubKey(".asi", True).SetValue("", "ASI.Document",
Microsoft.Win32.RegistryValueKind.String)
.CreateSubKey("ASI.Document\shell\open\command")
End With
------------------------------------------------------------------------------------------------
My user account is Administrator.
Also my trace file (trace.txt) is not generated if my app's directory
is under "program files". If my app's directory is not in "Program
files", then creation of trace file is working fine!
Thanks,
Dhananjay