I would like to do this in C programming without using string manipulation especially since the path contains a mix of forward and backward slashes.
path = "C:\Program Files\PTC/Creo 4.0/M040/Parametric/bin/parametric.exe";
var searchDir = Path.GetDirectoryName(Path.GetDirectoryName(Path.GetDirectoryName(path)));
The path is char array.
char InstallExe[MAX_PATH_LENGTH].
The output I am expecting is
searchDir = "C:\Program Files\PTC/Creo 4.0/M040"