none
VB10 - Register to startup problems.. Inserting works. but Deleting doesnt! RRS feed

  • Question

  • Hello

    Simple as the Title says:

    The line:

    My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).SetValue(Application.ProductName, Application.ExecutablePath)

    Works perfectly.... But the Delete Option just doenst...

    ive tried:

    My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue(Application.ProductName, Application.ExecutablePath)

    And 

    My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", False).SetValue(Application.ProductName, Application.ExecutablePath)

    But all didnt worked.... Any1 suggestions for me?

    Monday, June 18, 2018 2:38 PM

Answers

  • Thanks for you're quick response...

    Sadly it didnt worked either tho.

    The line: 

    My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue(Application.ProductName)

    Gives me as error:

    "There Doesnt excists a value with this name... Huh?

    • Marked as answer by XtremeNL Monday, June 18, 2018 7:21 PM
    Monday, June 18, 2018 3:01 PM

All replies

  • ive tried:

    My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue(Application.ProductName, Application.ExecutablePath)

    It should be :

    My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue(Application.ProductName)

    Monday, June 18, 2018 2:46 PM
  • Thanks for you're quick response...

    Sadly it didnt worked either tho.

    The line: 

    My.Computer.Registry.CurrentUser.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True).DeleteValue(Application.ProductName)

    Gives me as error:

    "There Doesnt excists a value with this name... Huh?

    • Marked as answer by XtremeNL Monday, June 18, 2018 7:21 PM
    Monday, June 18, 2018 3:01 PM
  • My bad!!! had the checkbox pre filled.. that gave an error.. very much thank u !
    Monday, June 18, 2018 3:02 PM
  • My bad!!! had the checkbox pre filled.. that gave an error.. very much thank u !

    If your issue is resolved, please close your thread by clicking the Mark as answer link at the bottom of the post or posts that lead to your solution.

    Thanks!


    Reed Kimble - "When you do things right, people won't be sure you've done anything at all"

    Monday, June 18, 2018 3:26 PM
    Moderator