A strange problem with Service ...

From: Polaris (etpolaris_at_hotmail.com)
Date: 06/16/05

  • Next message: JJ: "Re: A strange problem with Service ..."
    Date: Wed, 15 Jun 2005 17:53:18 -0700
    
    

    Hi:

    I have a very strange problem and could not make any sense out of it:

    I wrote a Windows service program (Win-XP). The program impersonates the
    loggedon user (a user with only "Guest" privilege) and access user's
    registry settings from HKEY_CURRENT_USER.

    I found out that the program works (which means successfully read values
    from the HKCU) ONLY if I pop up a message box (by calling MessageBox(...),
    does not matter what is shown by the message box) in the service program
    before the impersonating codes. If I do not show the message box in the
    service, I get error "File not found" while trying to read the registry
    values under HKCU. Reproducible each time.

    Why does popping up a messagebox make such a difference? Any hints welcome.

    Thanks In Advance !
    Polaris


  • Next message: JJ: "Re: A strange problem with Service ..."

    Relevant Pages

    • RE: A strange problem with Service ...
      ... You can better make a TrayIcon app which communicates with the service and ... "Polaris" wrote: ... > I wrote a Windows service program. ... The program impersonates the ...
      (microsoft.public.platformsdk.security)
    • RE: A strange problem with Service ...
      ... which does userinteraction. ... "Polaris" wrote: ... > I wrote a Windows service program. ... The program impersonates the ...
      (microsoft.public.platformsdk.security)
    • RE: A strange problem with Service ...
      ... which does userinteraction. ... "Polaris" wrote: ... > I wrote a Windows service program. ... The program impersonates the ...
      (microsoft.public.platformsdk.security)
    • Re: A strange problem with Service ...
      ... using the default user profile if it's not), ... HKCU and HKCR are global, ... > Impersonating a user does not map HKEY_CURRENT_USER. ... >> service program before the impersonating codes. ...
      (microsoft.public.platformsdk.security)