Solved

Is it possible to programmatically change the path?

Posted on 1998-08-13
5
149 Views
Last Modified: 2013-12-16
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?
0
Comment
Question by:barrett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 9

Expert Comment

by:rmarotta
ID: 1757643
Have you tried:

PATH=%PATH%;"new directory"

Regards,
Ralph

0
 

Author Comment

by:barrett
ID: 1757644
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.
0
 
LVL 10

Accepted Solution

by:
MasseyM earned 100 total points
ID: 1757645
You can run the PATH command at the DOS prompt... that would eliminate the need to reboot, but AUTOEXEC.BAT is the only place where the "paths" are set 9other than the permanant "windows" paths... They are located in your registry.

0
 
LVL 9

Expert Comment

by:rmarotta
ID: 1757646
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

0
 

Author Comment

by:barrett
ID: 1757647
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".
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question