Call Windump - ShellExecute

Hi,

I am building a basic program that calls WinDump.exe but it just isn't working. WinDump can be found here if anyone would be so kind to try and run it:

http://www.winpcap.org/windump/install/default.htm


Here is my code snippet:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
	SHELLEXECUTEINFO ExecuteInfo;
    
    memset(&ExecuteInfo, 0, sizeof(ExecuteInfo));
    
    ExecuteInfo.cbSize       = sizeof(ExecuteInfo);
    ExecuteInfo.fMask        = 0;                
    ExecuteInfo.hwnd         = 0;                
    ExecuteInfo.lpVerb       = "open";                      // Operation to perform
    ExecuteInfo.lpFile       = "C:\\Users\\Thomas\\Desktop\\WebForm_demo\\WinDump";  // Application name
    ExecuteInfo.lpParameters = " -i 3";           // Additional parameters
    ExecuteInfo.lpDirectory  = 0;                           // Default directory
    ExecuteInfo.nShow        = SW_SHOW;
    ExecuteInfo.hInstApp     = 0;
    
    if(ShellExecuteEx(&ExecuteInfo) == FALSE)
	{



	}


I have tried just running notepad and its fine - however WinDump doesn't work and vista returns me the standard "application has stopped working" error. I have also tried creating a batch file to execute windump and then get the prog above to execute the batch file.

The fact I am using Vista may be an issue (from some comments I have seen on various forums) but I can't work out what the problem is. Event Manager doesn't give me anything useful so i'm now stuck. If I run the exe with no params it just opens and closes instantly - would still expect the window to stay up with default params.

Please can anyone help> If you can successfully run WinDump with some different code that would be great.
Anyone, please?!?!?!
Can ANYBODY help?! :(
OK i've been looking at this for about 4 hours now and have got almost somewhere with it now!

I changed the directory to a directory I created on the root of the C Drive and it's worked?


UAC on vista a seriously annoying! I don't know much about how to get around this, but I can't understand why the previous directory would result in the generic "program has stopped working" error...

Hope this helps someone else?!
Topic archived. No new replies allowed.