Best Practice: It is recommended to append the .exe extension to applications.
1 |
sc.exe |
Explanation: By adding the extension .exe for applications, you make your code easier to read and you also prevent any confusion.
For example, running sc.exe and sc in PowerShell is different.
sc.exe (it runs C:\Windows\System32\sc.exe)
sc (is an alias for Set-Content)