Thursday, June 2, 2011

Vb.net registry editing?

hey, im making a program that automatically refreshes a webpage, among many other things, only annoying thing is that every time it refreshes, i hear a clicking sound.



ive figured out that the registry key for the click sound is



currentuser\AppEvents\Schemes

\Apps\Explorer\Navigating\.Current



if i change the value from

C:\Windows\media\Windows Navigation Start.wav

to any other path it simply stops making the click sound, but i want to be able to code it for users so they dont have to use regedit



i just cant figure out how to change it though, any advice?Vb.net registry editing?
Colanth has good advice - you need to be careful with what you change. If possible make backups of the key values.



But, in the spirit of learning here is some code to help:



Dim regKey As RegistryKey

Dim ver As Decimal

regKey = Registry.LocalMachine.OpenSubKey(%26quot;Softwa?True)

regKey.SetValue(%26quot;AppName%26quot;, %26quot;MyRegApp%26quot;)

ver = regKey.GetValue(%26quot;Version%26quot;, 0.0)

If ver %26lt; 1.1 Then

regKey.SetValue(%26quot;Version%26quot;, 1.1)

End If

regKey.Close()Vb.net registry editing?
That's a user preference - the Navigate sound. NEVER mess with user preferences. If the user doesn't want the Navigate sound, s/he will have turned it off.
  • learn and study bible
  • hair dryer
  • No comments:

    Post a Comment