Solved

Is it possible to programmatically change the path?

Posted on 1998-08-13
5
147 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Windows PC's still connected to domain even though server/domain removed. 6 39
Install both Office 2010 and 2013 4 36
PerfMon Report Time Out 6 22
Thoughts on PC Doctor 11 46
A Bare Metal Image backup allows for the restore of an entire system to a similar or dissimilar hardware. They are highly useful for migrations and disaster recovery. Bare Metal Image backups support Full and Incremental backups. Differential backup…
When you try to extract and to view the contents of a Microsoft Update Standalone Package (MSU) for Windows Vista, you cannot extract the files from the MSU. Here we are going to explain how to extract those hotfix details without using any third pa…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

776 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