473,414 Members | 1,740 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.

How to access Application.UserAppDataRegistry settings from a Windows service

Bob
I have a client app that writes a value to the registry (camera device ID).
I have used Application.CommonAppDataRegistry to write the value in my test
app.

How do I retrieve this data from a Windows service? Is the application
object accessible at all?

Cheers
Nov 20 '05 #1
3 5482
Bob
Just a correction - subject is incorrect - should be
CommonAppDataRegistry...

"Bob" <bo*@nospam.com> wrote in message
news:ud**************@TK2MSFTNGP09.phx.gbl...
I have a client app that writes a value to the registry (camera device ID). I have used Application.CommonAppDataRegistry to write the value in my test app.

How do I retrieve this data from a Windows service? Is the application
object accessible at all?

Cheers

Nov 20 '05 #2
Hi Bob,

The MSDN said,
If the key does not exist, it is created in the following format:
LocalMachine\Software\ CompanyName\ ProductName\ ProductVersion
http://msdn.microsoft.com/library/de...us/cpref/html/
frlrfsystemwindowsformsapplicationclasscommonappda taregistrytopic.asp

Provided the client app is WindowsApplication18, the info will be stored in
the key path below.
HKLM\SOFTWARE\WindowsApplication18\WindowsApplicat ion18\1.0.1392.32335
You may try to use the registrykey class to restrieve the data from the key
above.
e.g.
[Client app]
Application.CommonAppDataRegistry.SetValue("hello" ,"world")

[Windows Service]
Dim str As String
Dim lm As RegistryKey
lm = Registry.LocalMachine
Dim rkey As RegistryKey =
lm.OpenSubKey("SOFTWARE\WindowsApplication18\Windo wsApplication18\1.0.1392.3
2335")
str = CType(rkey.GetValue("hello"), String)
rkey.Close()

If you have any question on this issue, please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #3
Hi Bob,

Did my suggestion works for you?
If you have any question on this issue please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #4

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

Similar topics

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...
29
by: Patrick | last post by:
I have the following code, which regardless which works fine and logs to the EventViewer regardless of whether <processModel/> section of machine.config is set to username="SYSTEM" or "machine" ...
1
by: Siegfried Heintze | last post by:
I'm using a third party hosting service. I presently have a Web Service on this hosting service's server that loads and executes a native mode DLL. This demonstrates that the hosting service has...
4
by: LP | last post by:
Hi, My webservice is currently deployed on WIndows 2000 server and runs pretty fine. I am trying to run my webservice on a Windows 2003 server. My webservice tries to write to a eventlog. The...
4
by: TrinityPete | last post by:
Hi all, We have a web application that uses web services for data access and retrieval. The web app and web services reside under IIS on the same server(WIN2003). The virtual directories have...
0
by: David Palau | last post by:
We have a internal company WinForms application that makes some calls out to a intranet web service (once at application start-up for some configuration info and then periodically during the life...
0
by: haileydave | last post by:
Hi all, I have a simple Form app and I am trying to use the Application::UserAppDataRegistry object to persist UI settings to the registry. But when I create the object like this: ...
7
by: hufaunder | last post by:
I have a website that uses a web service that is located on the same machine. This webservice calls a program which in return modifies a file in c:\documents and Settings\All Users\Application...
7
by: bhavin30 | last post by:
Is there a way to obtain user information (using LOGON_USER server variables) when you have set up the security to Anonymous Access? I have tried setting the security to both Anonymous + Window...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.