
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Ok Chaps,
I'm losing the will to live with this one. The attached VbScript mods the registry and turns the selected Addins Off/On. I've been trying to replicate this in VB2008 Express to no avail. I've got no idea why the changes aren't being seen within the registry.
Can anyone help?
The code is called from:
Sub...
Dim DXInventor As New RegistryEntry
DXInventor.ChangeRegistryKey("B4A1FDAE-DF01-4F8F-BDF0-6F349DEC69B5", strOn)
End Sub...
----------------------------------------------------------------------------------------------------------------
Imports Microsoft.Win32
Public Class RegistryEntry
Public Sub ChangeRegistryKey(ByVal strMainKey As String, ByVal StrOn As String)
Dim key As String = "{" & strMainKey & "}"
Dim RegKey As RegistryKey = My.Computer.Registry.ClassesRoot.OpenSubKey _
("CLSID\{" & strMainKey & "}\Settings", True)
If Not RegKey Is Nothing Then
RegKey.SetValue("LoadOnStartUp", StrOn)
RegKey.Close()
End If
End Sub
End Class
Any help would be greatly appreciated.
Kind regards
Jon.
Solved! Go to Solution.