I've managed to solve it myself, it turns out that I have to delay the thread for a second, else the OSK would not have the opportunity to pop up, and thus killed. Correct me if I am wrong
try
{
killProcess();
try {
Thread.sleep(1000);
} catch(InterruptedException ex)
{
Thread.currentThread().interrupt();
}
Runtime.getRuntime().exec("c:\\Temp\\osk.exe");
}
catch ( Exception ex )
{
ex.printStackTrace();
}
}