-1

My computer is a part of company domain, I want to use the ShellApi's shellexcute function to run windows files with a given username and password (run as like), is it possible to include them in the function's parameters?

Raul
  • 656
  • 5
  • 17

1 Answers1

5

You can use the CreateProcessAsUser and LogonUser functions or, more directly, use the CreateProcessWithLogon function.

By the way, all these functions are declared in the JwaWinBase unit which is part of the JEDI API Library

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
RRUZ
  • 134,889
  • 20
  • 356
  • 483