title: Visual Basic won't change regkey value
body: <p>So, I've been working on my program for 3 hours now (I'm new to VB),
  so I've made the program to change the desktop wallpaper when a button is clicked, and it works fine, I want that as soon as you run the program as an administrator, that it changes the OEMBackground value is changed from 0 to 1,
  but it won't work, why?</p>
  
  <pre><code>Imports System.Environment
  Imports Microsoft.Win32
  Imports System
  Imports System.Reflection
  Imports System.Runtime.InteropServices
  
  
  Public Class Form_Main
      Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
          Me.Close()
      End Sub
  
      Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
          My.Computer.Audio.Play(My.Resources.Theme, AudioPlayMode.BackgroundLoop)
          Dim ChangeValue As Integer
          ChangeValue = 1
          My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background", "OEMBackground", ChangeValue)
      End Sub
  
      Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
          Dim Filepath As String
          Filepath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) &amp; "\Microsoft\Windows\Themes\TranscodedWallpaper.jpg"
          My.Resources.Monika.Save("TranscodedWallpaper.jpg", Imaging.ImageFormat.Jpeg)
          If My.Computer.FileSystem.FileExists(Filepath) Then
              My.Computer.FileSystem.DeleteFile(Filepath)
          End If
          My.Computer.FileSystem.MoveFile("TranscodedWallpaper.jpg", Filepath)
      End Sub
  
  End Class
  </code></pre>