我需要從與其關聯的註冊表項(本例中爲「HKEY_LOCAL_MACHINE \ SOFTWARE \ Computers and Structures,Inc. \ SAP2000 \ 18 \ Install path」)讀取應用程序的安裝路徑。 。Visual Basic.net。嘗試讀取註冊表項不起作用
我曾嘗試以下:
ProgramPath = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\SOFTWARE\Computers and Structures, Inc.\SAP2000\18", "Install path", Nothing)
什麼也沒有結果。
也試過如下:
ProgramPath = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("SOFTWARE\\Computers and Structures, Inc.\\SAP2000\\18\\Install path", True)
沒有成功要麼。
Here is how my registry looks like
我在做什麼錯? 在「Computers and Structures,Inc.」中是否可能存在空格或特殊字符(,。)的問題或在「安裝路徑」中?
對此的任何燈光將非常感激。提前致謝。
http://stackoverflow.com/questions/9491958/registry-getvalue-always-return-null – Mino