Solved

Specifying a path for windows 95 files

Posted on 1997-11-20
4
144 Views
Last Modified: 2013-12-16
Can I specify, and in what file, a path for my DLLs, or runtime libraries? I don't want them to be in the same directory as the application, nor in the windows directory, nor in the application working directory. In w3.1 and NT3.51, I could spacify it (in autoexec.bat, or thruogh the control panel). How can I do the same in windows 95?
0
Comment
Question by:mquiles
  • 2
  • 2
4 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 1751943
To quote from the MS Knowledge Base:

With both implicit and explicit linking, Windows first searches the set of pre-installed DLLs such as the performance library (KERNEL32.DLL) and the security library (USER32.DLL). Windows then searches for the DLLs in the following sequence:

1. The directory where the executable module for the current process is located.
2. The current directory.
3. The Windows system directory. The GetSystemDirectory function retrieves the path of this directory.
4. The Windows directory. The GetWindowsDirectory function retrieves the path of this directory.
5. The directories listed in the PATH environment variable.

Note that the LIBPATH environment variable is not used.

0
 

Author Comment

by:mquiles
ID: 1751944
Your answer is grate, but, may main question was: how can I modify the PATH environment variable? The autoexec.bat in C root seems not to be executed when I start the pc with windows 95
0
 
LVL 32

Accepted Solution

by:
jhance earned 100 total points
ID: 1751945
Win95 does read the AUTOEXEC.BAT file and it does set the PATH if you specify it in the file. See below:

AUTOEXEC.BAT Processing

AUTOEXEC.BAT is not required for Windows 95, but it is included for compatibility purposes. If the computer has an AUTOEXEC.BAT file, each line is processed in sequence during system startup. AUTOEXEC.BAT can contain additional application-specific entries that are run in the sequence they are listed.

Windows 95 passes the initial environment to COMMAND.COM with the correct Windows and Windows COMMAND directories already in the path and with the environment variables PROMPT, TMP, and TEMP already set. (TEMP= and TMP= indicate locations for temporary directories; both are specified for compatibility reasons.)

The following AUTOEXEC.BAT commands have equivalent default settings created in IO.SYS for Windows 95.

AUTOEXEC.BAT Equivalents for Windows 95 IO.SYS Default Settings

Command
 Meaning
 
net start
 Loads the real-mode network components and validates the binding. Any errors received are placed in the NDISLOG.TXT file. (SYSINIT or COMMAND.COM performs the necessary net start command.)
 
set path
 Sets the path as specified.
 




The default Windows 95 environment includes the following:




tmp=c:\windows\temp
temp=c:\windows\temp
prompt=$p$g
path=c:\windows;c:\windows\command
comspec=c:\windows\command\command.com

0
 

Author Comment

by:mquiles
ID: 1751946
Thanks for your answer, I suppose I didn't specify correctly the PATH variable (without SET PATH=, only PATH=).
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

932 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now