By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,238 Members | 1,901 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,238 IT Pros & Developers. It's quick & easy.

Can't write registry settings in a Windows Service.

P: n/a
Hello

I have a routine that among other things, reads and writes some simple settings to the registry. Everything works fine. I port this program to a windows service and start it and everthing works fine except it won't write any data to the registry. I can read it, but can't write it. I used .net 2003 debugger and attached to the process and when I write the key it doesn't throw an exception. I have tried having the service log in with Administrator privelages but still can't write..

Any ideas

TIA
John Hoffman
Nov 15 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
WRH
Hello

I had a similar problem that was solved by putting stuff in
HKEY_LOCAL_MACHINE and not HKEY_CURRENT_USER

Hope this helps

"John Hoffman" <an*******@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
Hello,

I have a routine that among other things, reads and writes some simple settings to the registry. Everything works fine. I port this program to a
windows service and start it and everthing works fine except it won't write
any data to the registry. I can read it, but can't write it. I used .net
2003 debugger and attached to the process and when I write the key it
doesn't throw an exception. I have tried having the service log in with
Administrator privelages but still can't write...
Any ideas?

TIA,
John Hoffman

Nov 15 '05 #2

P: n/a
WRH
Hello

I had a similar problem that was solved by putting stuff in
HKEY_LOCAL_MACHINE and not HKEY_CURRENT_USER

Hope this helps

"John Hoffman" <an*******@discussions.microsoft.com> wrote in message
news:AC**********************************@microsof t.com...
Hello,

I have a routine that among other things, reads and writes some simple settings to the registry. Everything works fine. I port this program to a
windows service and start it and everthing works fine except it won't write
any data to the registry. I can read it, but can't write it. I used .net
2003 debugger and attached to the process and when I write the key it
doesn't throw an exception. I have tried having the service log in with
Administrator privelages but still can't write...
Any ideas?

TIA,
John Hoffman

Nov 15 '05 #3

P: n/a
That sure solved it. Thanks much

-J
Nov 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.