Click here to Skip to main content
15,914,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: SDI using CApp in other Class.... Pin
Joan M1-Apr-03 19:14
professionalJoan M1-Apr-03 19:14 
GeneralProblem of asterisk's Pin
rohit.dhamija1-Apr-03 18:51
rohit.dhamija1-Apr-03 18:51 
GeneralExchange of values among different classes of same project Pin
summo1-Apr-03 18:50
summo1-Apr-03 18:50 
GeneralRe: Exchange of values among different classes of same project Pin
Woody Green2-Apr-03 3:22
Woody Green2-Apr-03 3:22 
GeneralChange display font setting (dpi) Pin
mijarral1-Apr-03 18:21
mijarral1-Apr-03 18:21 
GeneralRe: Change display font setting (dpi) Pin
Dudi Avramov2-Apr-03 0:54
Dudi Avramov2-Apr-03 0:54 
GeneralRe: Change display font setting (dpi) Pin
mijarral4-Apr-03 16:25
mijarral4-Apr-03 16:25 
GeneralRegistry vs MS Service Pin
rohit.dhamija1-Apr-03 18:01
rohit.dhamija1-Apr-03 18:01 
Dear All,

Can some body suggest some suitable soultion to below ?
I developed an application to restore wallpaper settings and made this application run as a SERVICE. I am doing following procedure to accomplish this task:
1) Copy HKEY_CURRENT_USER\Control Panel\Desktop
ie . Copy the desktop registry key
2) Saving it to HKEY_LOCAL_MACHINE\SOFTWARE\Desktop
ie. saved it to another key


Now a copy of desktop setting registry is saved in another key.
Now I make changes to my desktop settings. And the value get changed in HKEY_CURRENT_USER\Control Panel\Desktop

3) To restore back my original settigs I restore back the registry (from the copy i made)
ie. Restore registry
On clicking Restore buttton I restore the settings back ie. i copy
HKEY_LOCAL_MACHINE\SOFTWARE\Desktop back to
HKEY_CURRENT_USER\Control Panel\Desktop

--------My problem is that---
If i run this program without making it as a service, then it runs properly. But if I run this program as a service then it doesnot work because I am not able to make changes in HKEY_CURRENT_USER. ie. service doesnot allow.
Is there any other way to restore desktop settings . In any case the program should run as a service.
--------------------------
Please suggest some alternatives.

Rohit


GeneralRe: Registry vs MS Service Pin
Anders Molin1-Apr-03 22:02
professionalAnders Molin1-Apr-03 22:02 
General“EDIT” window and string storing Pin
sathyashrayan1-Apr-03 17:56
sathyashrayan1-Apr-03 17:56 
GeneralRe: “EDIT” window and string storing Pin
Rickard Andersson201-Apr-03 22:57
Rickard Andersson201-Apr-03 22:57 
GeneralRe: “EDIT” window and string storing Pin
sathyashrayan2-Apr-03 1:19
sathyashrayan2-Apr-03 1:19 
GeneralRe: “EDIT” window and string storing Pin
John R. Shaw2-Apr-03 10:53
John R. Shaw2-Apr-03 10:53 
QuestionCoCreateInstance fail? Pin
Kevein1-Apr-03 17:49
Kevein1-Apr-03 17:49 
AnswerRe: CoCreateInstance fail? Pin
Dave Bryant1-Apr-03 18:12
Dave Bryant1-Apr-03 18:12 
AnswerRe: CoCreateInstance fail? Pin
Aisha Ikram1-Apr-03 19:48
Aisha Ikram1-Apr-03 19:48 
AnswerRe: CoCreateInstance fail? Pin
Kevein2-Apr-03 6:02
Kevein2-Apr-03 6:02 
GeneralRe: CoCreateInstance fail? Pin
Aisha Ikram3-Apr-03 0:20
Aisha Ikram3-Apr-03 0:20 
GeneralRe: CoCreateInstance fail? Pin
Aisha Ikram3-Apr-03 0:20
Aisha Ikram3-Apr-03 0:20 
GeneralRe: CoCreateInstance fail? Pin
Kevein3-Apr-03 6:38
Kevein3-Apr-03 6:38 
GeneralRe: CoCreateInstance fail? Pin
Aisha Ikram3-Apr-03 17:43
Aisha Ikram3-Apr-03 17:43 
Generalwininet.lib linker error in VC7 Pin
Paul Lyons1-Apr-03 15:58
Paul Lyons1-Apr-03 15:58 
GeneralRe: wininet.lib linker error in VC7 Pin
paulb1-Apr-03 19:53
paulb1-Apr-03 19:53 
GeneralDetection of OCX File Pin
Coremn1-Apr-03 15:32
Coremn1-Apr-03 15:32 
GeneralRe: Detection of OCX File Pin
bryce1-Apr-03 15:54
bryce1-Apr-03 15:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.