Quote:
>r>Is it possible to make a change to the Dos Path from within a VB program
>r>(e.g. appending something at the end), in such a way that this change would
>r>take effect immediately?
>you may want to start this DOS batch-file, but it's, probably, not the
>kind of solution you are looking for?
> set path=MyNewPath;%path%
>you can create this batch-file within VB, but it will execute in a DOS-Box.
Two possible problems with this setup: (There was a thread about this
before.)
Your directory gets put in the front, knocking existing directories off
the end. Also, some people have a SET PATH= statement in their
*config.sys*, and if it's longer than 122 chars, then you've just
messed up their path more.
One possible solution to these dilemmas:
If you run that batch file, it will load another instance of command.com,
with it's own environment space, which is destroyed when it exits. The
user doesn't notice a thing, and their path doesn't get messed up. The
optimal solution. :)
Bottom line, make it a priority that your app doesn't have to be in the
path, and if it really, really, absolutely, just has to be there, put in
an option to let the user update his/her startup files manually.
--
_________________________________________________________
Robert Woodcock | Note: Your standard disclaimers apply. |
................| it can be quite a curse) - Plucky Duck |