I want to find a .exe files path programatically in Java, for example:
- Skype.exe is entered into a program to find the direct path to it
- Program does an algorithm that finds the file path
- Program returns the file path C:\Users\Public\Desktop\Skype.exe
A method I have tried is sorting through the systems files until "skype.exe" is found, but that takes up a lot of time and resources.
Is there any hack that could make it almost instant, like maybe a Win_Api function/cmd command or is sorting through the file system until the program is found the only way?