无法导入注册表脚本(.reg文件)Windows 7错误

问题描述:

嗨朋友,



我创建并尝试导入.reg文件,但收到错误:无法导入myfile.reg。指定的文件不是注册表脚本。您只能从注册表编辑器中导入二进制注册表文件。所以任何人都可以建议我,如何将.reg文件导入msconfig。

先谢谢



Mohan G

Hi Friends,

I created and tried to import a .reg file but I received the error: Cannot import myfile.reg. The specified file is not a registry script. You can only import binary registry files from within the registry editor. So can any one suggest me, How to import .reg file into msconfig.
Thanks in Advance

Mohan G

Hi Mohan,



在您的应用程序中尝试以下代码并查看它,



Hi Mohan,

Try the below code in your application and just check it out ,

Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true).SetValue(Application.ProductName, Application.ExecutablePath);





此代码将在msconfig中注册您的应用程序。希望这对你有很大的帮助。:)



This code will register your application in msconfig . Hope this may help you a lot .:)