# Region private void cleariecache () // clear ie Cache
// Certificate //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/// <Summary>
/// Clear the IE Cache
/// </Summary>
Private void cleariecache ()
{
Process = new process ();
Process. startinfo. filename = "cmd.exe ";
Process. startinfo. arguments = "/C" + "del/f/S/Q \" % USERPROFILE % \ Local Settings \ Temporary Internet Files \\*. *\"";
Process. startinfo. useshellexecute = false;
Process. startinfo. redirectstandardinput = true;
Process. startinfo. redirectstandardoutput = true;
Process. startinfo. redirectstandarderror = true;
Process. startinfo. createnowindow = true;
Process. Start ();
String result = process. standardoutput. readtoend ();
}
// Certificate //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Endregion
# Region private void cleariecookie () // clear ie cookie
// Certificate //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/// <Summary>
/// Clear ie cookie
/// </Summary>
Private void cleariecookie ()
{
Process = new process ();
Process. startinfo. filename = "cmd.exe ";
Process. startinfo. Arguments = "/C" + "del/f/S/Q \" % USERPROFILE % \ cookies \\*.*\"";
Process. startinfo. useshellexecute = false;
Process. startinfo. redirectstandardinput = true;
Process. startinfo. redirectstandardoutput = true;
Process. startinfo. redirectstandarderror = true;
Process. startinfo. createnowindow = true;
Process. Start ();
String result = process. standardoutput. readtoend ();
}
// Certificate //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Endregion
# Region private void killiewindows () // close the IE window
// Certificate //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/// <Summary>
/// Close the IE window
/// </Summary>
Private void killiewindows ()
{
Process [] process = process. getprocesses ();
For (INT I = 0; I <process. length; I ++)
{
If (process [I]. processname. tolower () = "iw.e ")
{
Try
{
Process [I]. Kill ();
Thread. Sleep (500 );
}
Catch
{
}
}
}
}
// Certificate //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
# Endregion