Create process with required privileges

From: Chris (cdore.connecttech.com)
Date: 05/28/04

  • Next message: Dan: "Re: CCertAdmin.SetCertificateExtension"
    Date: Fri, 28 May 2004 09:40:44 -0400
    
    

    Hi all,

    I have a Windows Installer custom action that gets launched during an
    install. This custom action needs to call SetupDiCreateDeviceInfo(), which
    requires that the process have SeLoadDriverPrivilege. When Windows
    Installer (msiexec) creates my custom action process, SeLoadDriverPrivilege
    is not granted (not just disabled, it doesn't exist). In an effort to fix
    this situation I'm trying to create a process launcher that will instead be
    launched from Windows Installer. This process launcher will then create my
    real custom action process. In my launcher, I call
    CreateProcessWithLogonW() to start my process with the required privileges.
    This works but has a problem; I have the admin account/password hardcoded so
    I could test the function.

    So my question is, can I somehow achieve the equivalent of
    CreateProcessWithLogonW() without having to prompt the user for credentials?
    Basically I want to create a new process with the full privileges granted to
    the account that the user is currently logged in as, but from a process that
    has restricted privileges.

    If there is a better way to achive what I am trying to do (even without the
    launcher) please send you suggestions.
    Thanks, Chris

    P.S. If you would like to read more info on my problem and when it occurs,
    refer to my post in microsoft.public.platformsdk.msi titled "CA security
    privileges".


  • Next message: Dan: "Re: CCertAdmin.SetCertificateExtension"