Computing.Net > Forums > Programming > C++ command for writing Windows Reg

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

C++ command for writing Windows Reg

Reply to Message Icon

Name: change2linux
Date: November 2, 2005 at 18:57:16 Pacific
OS: XP (don't ask..)
CPU/Ram: 500mhz, 224mb
Comment:

Hey, say I had a file called "entries.reg"... Is there a way, in C++ in Windows XP, to write this file to the Windows registry? "entries.reg" contains values for a program I'm working on

Thanks in advance everyone!



Sponsored Link
Ads by Google

Response Number 1
Name: djas
Date: November 4, 2005 at 09:49:11 Pacific
Reply:

There are better ways of writing to the registry than a .reg file but if thats what you want.

system("reg import entries.reg")

that should work.

djas


0

Response Number 2
Name: change2linux
Date: November 5, 2005 at 07:35:15 Pacific
Reply:

Thank you, but what are the better ways?


0

Response Number 3
Name: change2linux
Date: November 7, 2005 at 19:22:36 Pacific
Reply:

Well, I just tried it... No errors in the source, but when the application runs, it says "Error: Invalid file format".. I've also tried importing it as text.. any ideas anybody?

Also, for those reading, I discovered that the file stdlib.h has to be included for this to work.. I'm new to C++ ;)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: C++ command for writing Windows Reg

ASCII Commands for Serial port www.computing.net/answers/programming/ascii-commands-for-serial-port/7499.html

DOS command for 'Wait 5 seconds...' www.computing.net/answers/programming/dos-command-for-wait-5-seconds/11192.html

BASIC commands for screen color www.computing.net/answers/programming/basic-commands-for-screen-color/3064.html