Solved

HKEY_CURRENT_USER access to a SystemAccount service

Posted on 2000-02-29
2
324 Views
Last Modified: 2013-12-03
I'm writing a service that will run as the System Account, but I need to have access to HKEY_CURRENT_USER for whoever is logged on at any given time.  Is impersonating the logged on user considered the 'appropriate' thing to do?  And if so, does anyone have any source code that could demonstrate doing this?

Thanks,
Jon Stelly
0
Comment
Question by:jonpants
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
ID: 2572394
If you are running your service under the Local System Account (the default) you will have full access to the registry on the machine the service is running on.  There is no need to impersonate another user.

HKEY_CURRENT_USER is a mirror of the appropriate hive under HKEY_USERS.  If you want to change data for a particular user, change it under HKEY_USERS from your service.
0
 

Author Comment

by:jonpants
ID: 2589783
Thanks, I got it working now.  I'm just going through HKEY_USERS/SID/...  It works like a champ.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question