CreateProcessWithLogonW() Problem (advapi32.dll)

  • Thread starter Alireza Haghshenass
  • Start date
A

Alireza Haghshenass

Dear All
I am already using CreateProcessWithLogonW() 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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top