CreateProcessWithLogonW() Problem (advapi32.dll)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alireza Haghshenass

    CreateProcessWithLogonW() Problem (advapi32.dll)

    Dear All
    I am already using CreateProcessWi thLogonW() to create a process under an
    specific user but when i try to load that program again from an xml file I
    get an error like this. File not found. I mean the executable file is not
    recognized. until I open the open dialog and go to the folder of the program
    and this time the program starts the saved program. Do you know what is the
    problem?
    This problem does not exist for the executable files in Windows directory.
    Thanx




  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: CreateProcessWi thLogonW() Problem (advapi32.dll)

    Alireza,

    You should use the full path name of the file you want to execute. The
    reason it probably works if it is in the Windows directory is because that
    directory is set in the PATH environment variable. If you use the full
    path, then you shouldn't have a problem with this.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "Alireza Haghshenass" <alirezahk@hotm ail.com> wrote in message
    news:%23vks7Vnk DHA.1084@tk2msf tngp13.phx.gbl. ..[color=blue]
    > Dear All
    > I am already using CreateProcessWi thLogonW() to create a process under an
    > specific user but when i try to load that program again from an xml file I
    > get an error like this. File not found. I mean the executable file is not
    > recognized. until I open the open dialog and go to the folder of the[/color]
    program[color=blue]
    > and this time the program starts the saved program. Do you know what is[/color]
    the[color=blue]
    > problem?
    > This problem does not exist for the executable files in Windows[/color]
    directory.[color=blue]
    > Thanx
    >
    >
    >
    >[/color]


    Comment

    Working...