Where should I store shared resources between LocalSystem and regular user with UAC?

Posted by rwired on Stack Overflow See other posts from Stack Overflow or by rwired
Published on 2010-04-01T03:26:04Z Indexed on 2010/04/01 3:33 UTC
Read the original article Hit count: 266

Filed under:
|
|

My application consists of two parts: A Windows Service running under the LocalSystem account and a client process running under the currently logged in regular user.

I need to deploy the application across Windows versions from XP up to Win7.

The client will retrieve files from the web and collect user data from the user.

The service will construct files and data of it's own which the client needs to read.

I'm trying to figure out the best place (registry or filesystem, or mix) to store all this. One file the client or service needs to be able to retrieve from the net is an update_patch executable which needs to run whenever an upgrade is available.

I need to be sure the initial installer SETUP.EXE, and also the update_patch can figure out this ideal location and set a RegKey to be read later by both client and server telling them the magic location (The SETUP.EXE will run with elevated privileges since it needs to install the service)

On my Win7 test system the service %APPDATA% points to:

C:\Windows\system32\config\systemprofile\AppData\Roaming

and the %APPDATA% of the client points to:

C:\Users\(username)\AppData\Roaming

Interestingly Google Chrome stores everything (App and Data) in

C:\Users\(username)\AppData\Local\Google\Chrome

Chrome runs pretty much in exactly the way I want my suite to run (able to silently update itself in the background)

What I'm trying to avoid is nasty popups warning the user that the app wants to modify the system, and I want to avoid problems when VirtualStore doesn't exist because the user is running XP/2000/2003 or has UAC turned off.

My target audience are non-tech-savvy general Windows users.

© Stack Overflow or respective owner

Related posts about uac

Related posts about resources