Link to home
Start Free TrialLog in
Avatar of barrett
barrett

asked on

Is it possible to programmatically change the path?

What we're trying to do is programmatically append our directory to the path (permanently) during setup. It's a simple little .exe on NT, but the only way we know to do it on 9x is to modify autoexec.bat and reboot. Any suggestions?
Avatar of rmarotta
rmarotta

Have you tried:

PATH=%PATH%;"new directory"

Regards,
Ralph

Avatar of barrett

ASKER

Yes, we could take this approach, but my PM doesn't want to munge autoexec.bat, so we're kind of stuck. All the replies I've received so far tall me that there is no other way to do it under Win9x.
ASKER CERTIFIED SOLUTION
Avatar of MasseyM
MasseyM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
PM ??

You don't have to include the statement in the autoexec.bat file.  Simply issue it from a Dos prompt.

You could also write a simple batch file to change to the new directory and then call the program.

Let me know exactly what you are trying to do.......

Ralph

Avatar of barrett

ASKER

You're both right, of course, and the only solution appears to be what MsDev does w/ its vcvars.bat file. We were hoping for a persistent solution that doesn't require setting the PATH in each new DOS box w/ a .bat file (NT is so much nicer). The bug against our setup calls for this change to be made once, during installation, so it's invisible to the user. Probably not gonna happen, though.

BTW: PM is MS-speak for "Program Manager".