Im having a problem with my registry entries. Ok so i made a game and i made an installer in vb.net 2008 and i set it to write the game to the registry so that it shows up when you go to Add/Remove programs. The keys get created but it doesnt show up in Add/Remove, what am i missing?
I didnt create an uninstaller is that the problem?
InstallLog("Currently installing Pointblanc, please wait.")
'////////////////////////////////////////////////
'WRITING APP TO THE REGISTRY
'////////////////////////////////////////////////
'Opens the HKEY_LOCAL_MACHINE\SOFTWARE subkey and adds 'Pointblanc' subkey
InstallLog("Writing Game to Registry.")
Dim regKey As RegistryKey
regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE", True)
regKey.CreateSubKey("Pointblanc")
regKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Pointblanc", True)
regKey.CreateSubKey("Pointblanc")
regKey.Close()
Dim execToWrite As String = "c:\Pointblanc\Pointblanc.exe"
Dim iconToWrite As String = "c:\Pointblanc\Pointblanc.exe,0"
Dim icondestToWrite As String = "c:\ProgramData\Microsoft\Windows\Start Menu\Programs\Pointblanc.exe"
Dim icondestpToWrite As String = "c:\users\Public\Desktop\Pointblanc"
Dim ROOTToWrite As String = "c:\Pointblanc"
'WRITE VALUE
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\Pointblanc\Pointblanc", "Icon", iconToWrite)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\Pointblanc\Pointblanc", "IconDestPath0", icondestToWrite)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\Pointblanc\Pointblanc", "IconDestPath1", icondestpToWrite)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\Pointblanc\Pointblanc", "Executable", execToWrite)
My.Computer.Registry.SetValue("HKEY_LOCAL_MACHINE\Software\Pointblanc\Pointblanc", "RootPath", ROOTToWrite)
'Checks for the existence of the key before proceeding
If My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Pointblanc\Pointblanc", _
"Rootpath", Nothing) Is Nothing Then
InstallLog("Error Adding Game to the Registry.")
GoTo installfailed
Else
'InstallLog("Writing to registry successfull.")
Dim myValue As String = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\Software\Pointblanc", "install path", String.Empty).ToString
InstallLog("Successfully added to the registry.")
End If