473,382 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Can't write registry settings in a Windows Service.

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
3 3103
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
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
That sure solved it. Thanks much

-J
Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: DC Gringo | last post by:
I recently added a machine with Visual Studio.NET 2003 on a Win2k sp4 SERVER machine and am having problems with roaming profiles. Apparently the Machine Debug Manager (mdm.exe) service is holding...
3
by: jayanth.vishnuvardhan | last post by:
Hi All, Can any one help me on how to read & write the local machines registry values through scripting language. (vbscript/javscript)? I tried with Wscript.Shell Command & but with this we...
0
by: John Hoffman | last post by:
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...
10
by: Clint | last post by:
Hey all - I'm having a really confusing problem concerning a web service. Right now, I have an application that needs to call a web service that does nothing but return "true" (this will...
5
by: Chakkaradeep | last post by:
Hi all, in my service i added my Registry Programming code,am facing with a problem which am not able to rectify it..the problem is , in the service, the program gets hanged and doesnt move...
6
by: Dean R. Henderson | last post by:
I have a DTS Package I am able to execute successfully from a Windows Form application, but I cannot get this to work from an ASP.NET Web Service, although the Web Service impersonates the same...
2
by: Stu | last post by:
Hi, I am storing various settings for a windows service in the registry - but for some reason the windows service will not read them. Namespaces: Imports System.ServiceProcess Imports...
3
by: Ahmad Jalil Qarshi | last post by:
Hi! I am developing an application in C# as a windows NT Service. This application needs to check for eventlog using EventLog.Exists("System") But unfortunately it generates exception...
11
by: vovan | last post by:
I'm using this approach to read from registry. Dim f As New RegistryPermission(RegistryPermissionAccess.AllAccess, _ "HKEY_LOCAL_MACHINE\SOFTWARE\SRS Enterprises\Coordinator\Settings") 'Vlad...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.