[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn-0.14.0-r2667-setup.exe has show stopper bug in it PATH corrupted on Win XP/W2K/NT systems

From: Barry Scott <barry.alan.scott_at_ntlworld.com>
Date: 2002-08-13 23:12:20 CEST

> My C/C++ knowledge are very limited but you (and everyone) are most welcome
> to make this in C/C++. I will be grateful if yo do that :-)

O.K. I've found the time to contribute. :-)

I've written the NT part of the path update logic for NT, W2K and XP
as a C++ program that uses limited features to keep the image size small
and dependencies to a minimum.

Tomorrow I'll test the code at work where I can get my hands on NT4 and
W2K systems.

The code is a single EXE that only depends on Windows system DLLs,
kernel32.lib user32.lib advapi32.lib.

Below is a reference for the utility.

                Barry

ntpath - utility to add and remove paths from the Windows NT PATH.

syntax:
ntpath add <path>
ntpath remove <path>

command line parsing is very simplistic extra spaces will mess things up.

add action:

Add <path> to the system PATH variable if the user has permission otherwise
update the users PATH variable. Create the users PATH variable if it
does not exist in the registry (which is true of a new users account).

The type of the PATH value is preserved. If its REG_EXPAND_SZ then it
stays REG_EXPAND_SZ, if its REG_SZ then it stays REG_SZ. This will allow
the code to work on NT, W2K and XP. There are no version checks.

Return code:
0 - <path> added
1 - add failed

remove action:

Attempt to remove <path> from the system PATH variable and the users PATH
variable.

Return code:
0 - <path> removed
1 - removed failed

Example:

ntpath add C:\Progam Files\Subversion
ntpath remove C:\Progam Files\Subversion

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 13 23:12:53 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.