I need to progmatically call gacutil to uninstall some binaries from GAC.
To be able to use gacutil commands from cmd I had to add the gacutil path to the PATH variable. But now that I'm trying to run gacutil from code, I need to dynamically resolve the path of the gacutil to be able to start the process. But I couldn't find a way to resolve the gacutil path yet. Is there any?
I did try expanding the PATH environment variable like suggested in this answer, but since PATH variable has multiple directories on it (separated by semicolons), there's no simple way to resolve the gacutil path.
But obviously when I type gacutil in cmd it somehow resolves the path searching through all the available directories in the PATH variable. How can I make that happen from code?