Reading 32bit Registry value into ZennoPoster

Maddis

Новичок
Регистрация
22.10.2018
Сообщения
27
Благодарностей
3
Баллы
3
Hi, hopefully someone can help. I am trying to return a value that is in my 32bit registry with the custom C# Action so I can store the value as a variable.

I have tried many C# variations but can't get a return value. Can anyone possibly help?

My Key is : "Computer\HKEY_CURRENT_USER\Software\VB and VBA Program Settings\My Program\API"
and the string value i want to read is "AccessURL"

This is what I have tried so far with no luck:

C#:
var key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\VB and VBA Program Settings\My Program\API");
var subKey = key.GetValue("AccessURL");
return subKey;
Maddis :-)
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 453
Благодарностей
5 913
Баллы
113
Hi, hopefully someone can help. I am trying to return a value that is in my 32bit registry with the custom C# Action so I can store the value as a variable.

I have tried many C# variations but can't get a return value. Can anyone possibly help?

My Key is : "Computer\HKEY_CURRENT_USER\Software\VB and VBA Program Settings\My Program\API"
and the string value i want to read is "AccessURL"

This is what I have tried so far with no luck:

C#:
var key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\VB and VBA Program Settings\My Program\API");
var subKey = key.GetValue("AccessURL");
return subKey;
Maddis :-)
Do you get some message in execution log?
 

Maddis

Новичок
Регистрация
22.10.2018
Сообщения
27
Благодарностей
3
Баллы
3
I figured it out. This is what worked for me:

C#:
Microsoft.Win32.RegistryKey key = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"SOFTWARE\VB and VBA Program Settings\MEmu Launcher\Settings\");


if (key != null)

{

    project.Variables["API_IP_CheckURL"].Value = (key.GetValue("ProxyTestURL").ToString());

    key.Close();

}
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)