accessing registry

how can I acces the registry by a ms-dos program, when windows is not loaded (but ms-dos is)?
smaugwarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Vinayak KumbarSr Program ManagerCommented:
Hi,

U want to get registry from Dos promt?
Then just type regedit at C:\Windows, u will get the details. then give the option and u will get the details. The option will be as

Imports and exports registry files to and from the registry.

REGEDIT [/L:system] [/R:user] filename1
REGEDIT [/L:system] [/R:user] /C filename2
REGEDIT [/L:system] [/R:user] /E filename3 [regpath1]
REGEDIT [/L:system] [/R:user] /D regpath2

  /L:system       Specifies the location of the SYSTEM.DAT file.
  /R:user         Specifies the location of the USER.DAT file.
  filename1       Specifies the file(s) to import into the registry.
  /C filename2    Specifies the file to create the registry from.
  /E filename3    Specifies the file to export the registry to.
  regpath1        Specifies the starting registry key to export from.
                  (Defaults to exporting the entire registry).
  /D regpath2     Specifies the registry key to delete.

Try it out.
VinExpert
0
nv3prasadCommented:
In VC6.0 create an Console Appliation with MFC support and use

In your WinApp InitInstance use,

free((void*)m_pszRegistryKey);
//Change the name of the registry key.

SetRegistryKey(_T("Your Key"));

Add the Following code to write to the registry location,

AfxGetApp()->WriteProfileString("Complete Path of the Reg Key",
 "Reg key" Item", "Value of Item");


Add the Following code to Read from registry location,

AfxGetApp()->GetProfileString(
"Complete Path of the Reg Key",
 "Reg key" Item", "Value of Item");


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Programming

From novice to tech pro — start learning today.