-1

I tried to start zap.exe in daemon mode using C#, but the exe gets opened with the Project's name always. The process javaw.exe will get started whenever zap starts in daemon mode. enter image description here

I tried with code attached here, but no success enter image description here

  • can you share more details? what is the issue? does Zap's start? And what does it mean "opened with the Project's name"? Also, maybe you want to redact your image, look like it contains password.. – Omer Levi Hevroni Feb 14 '18 at 10:26
  • When I start the exe manually, it gets started in Administrator user, but when I start the exe with code it starts with Project's name only. You can refer the screenshot of Task Manager where javaw.exe opened with AppSentry username – Anamika Bhadola Feb 14 '18 at 11:28
  • why do you need to run it as admin? also, that sounds like C# issue to me. - maybe [this](https://stackoverflow.com/questions/2532769/how-to-start-a-process-as-administrator-mode-in-c-sharp) will help? – Omer Levi Hevroni Feb 14 '18 at 11:43

1 Answers1

0

javaw.exe will start anytime that ZAP starts (not just daemon mode), because ZAP is a java app.

There shouldn't be any need for ZAP to run as administrator.

If there's an issue with the user account being used to launch it you should look into "Run as" (CreateProcessAsUser, etc). If you're currently running code from within an IDE like Visual Studio or whatever then it's probably picking the username of whatever account launched the IDE. (Or from the properties of the project you're working on.)

You could also look into:

public static Process Start(
    string fileName,
    string userName,
    SecureString password,
    string domain
)

https://msdn.microsoft.com/en-us/library/sxf2saat(v=vs.110).aspx

You could try to narrow down the cause of the issue by launching something else, like calc.exe.

Is there something specific that makes you think this is a ZAP issue and not a C#/Visual Studio/Windows issue?

kingthorin
  • 1,419
  • 9
  • 18