Author |
Topic |
|
3di
Germany
26 Posts |
Posted - 10/12/2015 : 03:01:39
|
Hi,
I like to kill some processes, in case some Applications do not respond.
I usually use some batchfiles to do so, but if Explorer.exe doesn't respond such batch files are starting not very reliable.
Is it possible to run a cmd Comand directly in S+?
My Idea was like this, but I'm not shure if there is a better way. I have a lot of Processes to kill if my systems becomes unstable.
------------------------------------------------------- acShellExecute("open","C:\\Windows\\System32\\cmd.exe", "", "", 1) acDelay(200) acSendKeys("taskkill /f /im explorer.exe && start explorer{ENTER}") -------------------------------------------------------
For any suggestions thanks in advance. Best Regards
|
|
Rob
USA
2615 Posts |
Posted - 10/12/2015 : 22:55:22
|
You could just call the programs directly like below (I used Notepad instead of Explorer):
acRunProgram("c:\\windows\\System32\\taskkill.exe","/f /im notepad.exe",0, 1) acDelay(100) acRunProgram("c:\\windows\\notepad.exe","",0, 1) |
|
|
Rob
USA
2615 Posts |
Posted - 10/12/2015 : 22:58:58
|
Also, you can change the last parameter to "0" so you don't even see the taskkill window briefly appear:
acRunProgram("c:\\windows\\System32\\taskkill.exe","/f /im notepad.exe",0, 0) |
|
|
|
Topic |
|
|
|