Hi Andy,
Can you use the Windows Script Host SendKeys method to automate the stopping process ? This is the way to go until we enable scripting of the capture process itself in the next release. See
support.microsoft.com/kb/259103
The following script finds a running Unsniff App, Stops the capture, saves it into a file, and quits the application. I've added messages to help you understand what its doing.
Set WshShell = CreateObject("wscript.Shell")
WScript.stdout.WriteLine "Activating running instance of Unsniff"
WshShell.AppActivate("Unsniff Network Analyzer")
WScript.Sleep(2000)
WScript.stdout.WriteLine "Stopping the capture Menu: Capture -> Stop "
WshShell.SendKeys("%cp")
WScript.Sleep(2000)
WScript.stdout.WriteLine "Saving the file Menu: File -> Save"
WshShell.SendKeys("%fs")
WScript.Sleep(2000)
WScript.stdout.WriteLine "Supplying a file name to save i"
WshShell.SendKeys("mysavedfile-999.usnf")
WScript.Sleep(1000)
WshShell.SendKeys("{ENTER}")
WScript.Sleep(10000)
WScript.stdout.WriteLine "Stopping Unsniff Alt+F4"
WshShell.SendKeys("%{F4}")
Whenever you determine it is time to stop Unsniff just run the above script. You may wish to increase the 10000 ms (10sec) timeout if your files are big and need more than 10 secs to save.
I've tested the above and it works fine. Let me know how this goes !
Thanks,