leandropoblet
10 years agoFrequent Contributor
Solved
Execute elevated command line tools
Hi all,
I'm experiencing some crashes in our application. The thing is I need to execute a memory dump before killing the application which is failing to close properly.
We are using this tool: ProcDump
which requires to be executed in an elevated terminal.
I also need help on how to call it in C# script since I couldn't find how to do it.
Cheers!
I'm experiencing some crashes in our application. The thing is I need to execute a memory dump before killing the application which is failing to close properly.
We are using this tool: ProcDump
which requires to be executed in an elevated terminal.
I also need help on how to call it in C# script since I couldn't find how to do it.
Cheers!
- To run an elevated application from TestComplete, you need to run TestComplete as an administrator.
You can run apps using either TestedApps, or the shell's Run method:
Sys["OleObject"]("WScript.Shell")["Run"]("procdump notepad", 1, true);
If the command line includes file paths with spaces, put quotes around them:
Sys["OleObject"]("WScript.Shell")["Run"]("\"C:\My Tools\procdump.exe\" notepad", 1, true);