0

Possible Duplicate:
To run cmd as administrator along with command?

I want to run a cmd using administrator privileges and then pass the command to the process that is running cmd as administrator.

I don't want to use proc.standardinput to pass the command is there any other method?

Community
  • 1
  • 1
purvang
  • 339
  • 4
  • 6
  • 15
  • @SBlackler i want to store the ssl certificates in trusted root and it require admin privileges i will do this using cmd – purvang Sep 30 '11 at 13:34
  • I assume this should be possible if the program calling `cmd` is already running with admin privs. Else this sounds a lot like you trying to elevate your privs, which should not be possible for security reasons. – CodesInChaos Sep 30 '11 at 13:38
  • You asked the same question twice. You need to delete one of them. – Jeff LaFay Sep 30 '11 at 13:52

1 Answers1

0

You need to use the next api function from advapi32.dll CreateProcessAsUser

Tadeusz
  • 6,453
  • 9
  • 40
  • 58