This is a migrated thread and some comments may be shown as answers.

can i use process.Start() and process.WaitForExit() ?

2 Answers 12 Views
Fiddler Classic
This is a migrated thread and some comments may be shown as answers.
Basel
Top achievements
Rank 1
Basel asked on 12 Mar 2014, 04:02 PM
can i use process.Start() and process.WaitForExit() ?
i need to create log with external program
now i want to use process.start to start the program and process.WaitForExit to wait for the program

2 Answers, 1 is accepted

Sort by
0
Basel
Top achievements
Rank 1
answered on 12 Mar 2014, 04:03 PM
and i wate to use this in fiddler script
0
Eric Lawrence
Telerik team
answered on 12 Mar 2014, 07:08 PM
FiddlerScript can call nearly any method in the .NET Framework. Beyond that, Fiddler itself exposes a method that you can use for this, from FiddlerScript or an extension:

Utilities.RunExecutableAndWait("C:\\temp\\myapp.exe", "myparameter1 myparameter2");

Please do keep in mind that this is a blocking call, so if you call it from a session-processing callback like OnBeforeRequest or OnBeforeResponse, that session will be blocked until the executable exits. If you call it from a UI-processing callback (e.g. a ToolsAction handler or the like) it will block the UI until the executable exits.

Depending on your needs, you may want to keep a log "in memory" and only flush it to disk from time to time. Or you could write an Exporter that would show up inside File > Export Sessions.

Tags
Fiddler Classic
Asked by
Basel
Top achievements
Rank 1
Answers by
Basel
Top achievements
Rank 1
Eric Lawrence
Telerik team
Share this question
or