windows service not able to read current user's registry plz help
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: windows service not able to read current user's registry plz help

  1. #1
    Join Date
    Mar 2008
    Posts
    4

    Angry windows service not able to read current user's registry plz help

    Dear All,

    I developed a windows service project using vb.net and windows service is installed with logon account as admin's user name and password. Target of windows service is to read the pst file path location from windows registry for currently logged user by accessing the following registry key "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\Outlook\52a407cf2e436a4d8fe252d1d2574655\001f6700". The problem is , windows service can able to read the admin pst file path location if admin is logged in windows. When other user logged in windows, service is not able to read currently logged user's pst file path location from registry because of windows service is configured with admin user name and password. so it always reads admin's pst file location. Please let me know the solution for this or suggest me.

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,981

    Re: windows service not able to read current user's registry plz help

    The actual key probably changes. Can't see the administrator being blocked, unless you're running as something else. You could impersonate the current user, couldn't you?
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center