There are lots of error of basic programming and not related to shell execute and I would try to point some of them

Code:
if(ShellExecute(NULL, "explore", "\\\\panarchy\\share", NULL, NULL, SW_SHOWNORMAL); == ERROR_PATH_NOT_FOUND)
In if statement we should not have a ;

In the last post you have else without an if.