Dos Path change 
Author Message
 Dos Path change

Is it possible to make a change to the Dos Path from within a VB program
(e.g. appending something at the end), in such a way that this change would
take effect immediately?


Sun, 25 Jan 1998 03:00:00 GMT  
 Dos Path change
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.
--
   __
  |_
  | RANK MAHLER



Fri, 30 Jan 1998 03:00:00 GMT  
 Dos Path change

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 |



Sat, 31 Jan 1998 03:00:00 GMT  
 Dos Path change
: 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
: r>would 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.

... and if you invoke this two line batch file from Windows, either
directly, or via a VB program, the modified path will belong to the
instance of COMMAND.COM created to run the batch file, and will disappear
on completion. It is possible for a DOS program to modify the environment
of its parent process (requires some slight of hand techniques in
assembler). It is not recognized as legal to do this, however, and I
would expect the results to be less predictable with Windows present.

--

EDMONTON, Alberta, CANADA



Wed, 04 Feb 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ? How do you change a path to a dos path name

2. Parsing an HTML Document - Change Relative paths to fully qualified paths

3. Changing Long Paths to Short Paths in a 16-bit App

4. Getting DOS 8.3 path from Windows long file name

5. Expand dos 8.3 path to windows style

6. How to start dos exe with default path information

7. dos path

8. File exists in Dos Path?

9. DOS Path

10. Help ! Search codes for MS-DOS Path

11. return dos path from common dialog

12. Set DOS/Windows Path On-The-Fly

 

 
Powered by phpBB® Forum Software