Skip to content

Instantly share code, notes, and snippets.

@barik
Created July 19, 2012 21:58
Show Gist options
  • Save barik/3147147 to your computer and use it in GitHub Desktop.
Save barik/3147147 to your computer and use it in GitHub Desktop.
/* BOOL fnEditPath(char *ExistingPath);
*
* Function will add the szSetupPath to the users path statement in the
* autoexec.bat file. The szSetupPath will be the first location in the
* path statement. The path can be in about a million fucked up forms
* depending on the level of stupidity in the user. Here are a few to
* think about. DOS will accept any of these.
*
* PATH=C:\foo;C:\foobar;...
* SET PATH=C:\foo;C:\foobar;...
* PATH C:\foo;C:\foobar;...
* PATH =C:\foo;C:\foobar;...
* PATH= C:\foo;C:\foobar;...
* PATH = C:\foo;C:\foobar;...
*
* ENTRY: ExistingPath - near buffer containing the path statement to be
* edited.
*
* EXIT: BOOL, TRUE = Path succesfully modified.
* FALSE = Path was too long after modification (path >= 128).
*
*/
BOOL fnEditPath(ExistingPath)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment