How can I get the last run command as a string and store it? say suppose:
Step1:XYZ.exe parm1 parm2
step2:If(condition true){do something}
Else {string lstcmd = XYZ.exe parm1 parm2}
I need to get the XYZ.exe parm1 parm2 as a string, so that I can use this small piece of code for every command I run.