473,414 Members | 1,684 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,414 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 3105
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...
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.