?
Solved

Save Registry File

Posted on 2000-03-05
13
Medium Priority
?
198 Views
Last Modified: 2010-04-10
When trying to perform RegSaveKey()
the function returns error saying

"A required privilege is not held by the client."

How do I give right privilage to my process. Doing it from user manager didn't help.

Thanks
0
Comment
Question by:Yulia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
13 Comments
 
LVL 9

Expert Comment

by:Pacman
ID: 2586686
to which group do you want to write ?
(full path)
0
 

Author Comment

by:Yulia
ID: 2586709
I want to backup some branch inside
HKEY_CURRENT_USER, I succeeded opening
it.
0
 

Author Comment

by:Yulia
ID: 2586713
I want to backup some branch inside
HKEY_CURRENT_USER, I succeeded opening
it.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 9

Expert Comment

by:Pacman
ID: 2586784
how do you write the key?
Could you post the code please?
0
 

Author Comment

by:Yulia
ID: 2586816


There is a key in my registry,
under HKEY_CURRENT_USER,
I put it in lpSubKey.

LONG error = RegOpenKeyEx(                          hKey,                           lpSubKey,                                 0,                                      KEY_ALL_ACCESS,                         &phkResult
       );
                        
LPCSTR f = "back.reg";
LONG error2 = RegSaveKey(      
            hKey, "back.reg", NULL);
0
 

Author Comment

by:Yulia
ID: 2586818
The file back.reg is being created but
it's empty
0
 
LVL 9

Expert Comment

by:Pacman
ID: 2586825
how do you write the key?
Could you post the code please?
0
 
LVL 9

Expert Comment

by:Pacman
ID: 2586833
oops, sorry i did hit reload ...
0
 
LVL 9

Expert Comment

by:Pacman
ID: 2586843
Yulia,

in my SDK doc i read that you need a special privileg if you are on Windows NT. Are you using Windows NT ?
0
 

Author Comment

by:Yulia
ID: 2586859
Yes, I know, what I don't know is
how to attach to a process this special privilage.
I use Windows NT
0
 
LVL 9

Expert Comment

by:Pacman
ID: 2586879
Yulia,

there is a KB article about this. This should solve your problem.
Article ID: Q128731

If you dont have msdn I could post you the article if you want.
0
 
LVL 9

Accepted Solution

by:
Pacman earned 300 total points
ID: 2586909
or view it on the online kb of the microsofties:

http://support.microsoft.com/support/kb/articles/Q128/7/31.asp?LNG=ENG&SA=ALLKB&FR=0

regards Pacman
0
 
LVL 2

Expert Comment

by:KAbbott
ID: 2587703
This should help you there's plenty of help here:

http://www.codeguru.com/system/registry_ult.shtml

Try it !!!!!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question