0

I'm not sure if this is the right forum, but i always seem to get redirected here with questions regarding .NET

Im using Managed C++ and im trying to edit a registry key.

using namespace System;
using namespace Microsoft::Win32;

int main()
{
	RegistryKey^ rk = Registry::CurrentUser;
	rk->OpenSubKey(L"Software\\Microsoft\\Command Processor", true);
	rk->SetValue(L"Autorun", L"VALUE");
	rk->Close();
}

This compiles, but it doesn't change the registry key. Whats wrong?

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by brando|away
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.