I already took a look at this post: How can I start explorer.exe via C++? which is an old post. I was playing around with batch file command and I wanted to replicate this function using C++
taskkill /f /im explorer.exe
start explorer.exe
I'm using the
system(" ")
command in C++ to make it happen. Here is the code: Note, killing the explorer.exe is working but I can't start it again.
#include "pch.h"
#include <windows.h>
#include <iostream>
int main ()
{
system("taskkill /f /im explorer.exe");
system("explorer.exe");
}
Instead of opening the explorer.exe to bring back the windows UI, it open the quick access in windows. Any idea?