Discussion on:

cleanly stop and restart explorer.exe

Message 2 of 12

View entire thread
0 Votes

It sounds like you just want to be able to pass in the name/path of the program to run to a generic program you write. Is this correct, or do you also want to create a GUI that lets the user select the program to run?

If it's the former then that's easy. You can re-code your batch file to take in the program path as a variable if you like. You can do the same thing in other languages too. Most languages will have a bunch of process calls like ProcessKill or ProcessClose. The documentation for whichever language you choose will show you how to do this. You shouldn't expect random TechRepublic members to do your homework for you when you can do it just as easily yourself. If your language happens not to have such a function then you can call Taskkill just like your batch file does.