3
我正在使用C#开发.NET框架中的Windows应用程序。在安装应用程序时,我想将注册表写入一定的值。如何:在注册表中创建一个键(Visual C#)?
我正在使用C#开发.NET框架中的Windows应用程序。在安装应用程序时,我想将注册表写入一定的值。如何:在注册表中创建一个键(Visual C#)?
Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Names");
key.SetValue("Name", "Isabella");
key.Close();
http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.aspx
的
可能重复[.net注册阅读写作(http://stackoverflow.com/questions/1908539/net-registry-reading-writing) – 2012-03-11 07:09:36
如果你想要写注册表在安装过程中,它将取决于您使用的安装程序技术。 – BryanJ 2012-03-11 07:11:19
通常情况下,您的安装程序将为此提供工具,而您不会编写代码。 – 2012-03-11 10:39:07