Hi Ignacio,
Thanks for replying.My mistake that I hadn't specified the process name
"explorer.exe" in the process.now I am able to get the handle but
process.kill gives the error that the process is already exited.and
closeHandle does not do anything.using getlasterror i am getting the
following error.
ERROR_MOD_NOT_FOUND
126 The specified module could not be found.
here is the code
static int WM_CLOSE = 0x0010;
string path = @"C:\Documents and Settings\rakesh\Desktop\A"
pr.StartInfo.CreateNoWindow = true;
pr.StartInfo.Verb = "Open";
pr.StartInfo.FileName = "explorer.exe";
pr.StartInfo.Arguments = path;
pr.Start();
//pr.Kill();//gives the error the process has already exited
iptr = pr.Handle;
SendMessage(iptr,(uint)WM_CLOSE,0,0);
int errorCode = Marshal.GetLastWin32Error();
Console.WriteLine("errorCode::"+errorCode.ToString());//gives errorcode
126
**************************************
can you tell me how to change the explorer setting manaully.and what
registrykeys i should watch.because even if i watch only explorer.exe
it gives a lot of keys.Any help will be greatly appreciated.Thanks in
Advance.
Rakesh