Public Sub DisableSound()
Dim keyValue As String
keyValue = "%SystemRoot%\Media\"
If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor > 0 Then
keyValue += "Windows XP Start.wav"
ElseIf Environment.OSVersion.Version.Major = 6 Then
keyValue += "Windows Navigation Start.wav"
Else
Return
End If
Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(_
"AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True)
key.SetValue(Nothing, "", Microsoft.Win32.RegistryValueKind.ExpandString)
End Sub
Public Sub EnableSound()
Dim keyValue As String
keyValue = "%SystemRoot%\Media\"
If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor > 0 Then
keyValue += "Windows XP Start.wav"
ElseIf Environment.OSVersion.Version.Major = 6 Then
keyValue += "Windows Navigation Start.wav"
Else
Return
End If
Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(_
"AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True)
key.SetValue(Nothing, keyValue, Microsoft.Win32.RegistryValueKind.ExpandString)
End Sub