使用Win32或其他库导入reg文件 [英] import .reg files using win32 or other libraries

查看:129
本文介绍了使用Win32或其他库导入reg文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是与此相关的一点,但它不是我的目标为:

My question is a bit related to this one but it's not what I was aiming for:

<一个href=\"http://stackoverflow.com/questions/35070/programmatically-merge-reg-file-into-win32-registry\">http://stackoverflow.com/questions/35070/programmatically-merge-reg-file-into-win32-registry

我想要做的就是创建一个程序,可以使用Win32或其他一些库中导入.reg文件。我试着环顾四周,但在该部分失败。有点像 REGEDIT.EXE / S 功能。是否有可能做到这一点没有,无论如何使用Regedit.exe或REG.EXE?

What I want to do is to create a program that can import a .reg file using win32 or some other library. I tried looking around but failed at that part. Something like a regedit.exe /s function. Is it possible to do this without using regedit.exe or reg.exe in anyway?

所以..没有系统(myfile.reg)或类似的ShellExecute()使用REG.EXE或Regedit.exe

So.. no system("myfile.reg") or like ShellExecute() using reg.exe or regedit.exe

谢谢!

推荐答案

由于的regedit.exe 的创建摆在首位的reg文件,我真的不知道你为什么会不会也想它做进口。

Since regedit.exe created the reg file in the first place, I'm not really sure why you wouldn't also want it to do the import.

另外一个选择是将解析reg文件,然后解析的信息转换成直接调用的 RegCreateKey RegSetValue 的Win32 API函数,但我怀疑这会是编码工作相当数量。

One other option would be to parse the reg file and then convert the parsed information into direct calls to the RegCreateKey, RegSetValue Win32 API functions, but I suspect that would be a fair amount of coding effort.

这篇关于使用Win32或其他库导入reg文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆