Solved

HKEY_CURRENT_USER access to a SystemAccount service

Posted on 2000-02-29
2
304 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
2 Comments
 
LVL 32

Accepted Solution

by:
jhance earned 50 total points
Comment Utility
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
Comment Utility
Thanks, I got it working now.  I'm just going through HKEY_USERS/SID/...  It works like a champ.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now