WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Window Manipulation

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Finding Windows Location on Remote (or local) Win95 Machine

Keywords:     locate remote Windows directory

Question:

How do I find out the location of the Windows directory on a remote PC?

Answer:

The easiest way to do this on a Win95 system(local or remote) is to read the MSDOS.SYS file which is ALWAYS in the root directory of the boot drive, and is also flagged or attribbed System, Hidden and Read-only.

You should not have to use the AttrGet and AttrSet commands on these files. If you look at this file on your system, (edit will work on hidden files if you specify the path in the command line) you will see that it is merely a text file and contains the entries for WinDir and WinBootDir inside it.

You CAN use the IniReadPvt to read the data from this file, as shown below:

Windir=IniReadPvt("Paths","WinDir","","c:\msdos.sys")
WinBootDir=IniReadPvt("Paths","WinBootDir","","c:\msdos.sys")
Then you can use these variables as %WinDir% in your path name to access files in the windows directory.

I believe there is a similar file within NT4 systems (c:\msdos.---), but can't be sure that is the exact name. There should be some other tricks for old Windows as well.

One of the handiest things about the MSDOS.SYS file is that you can see your Host drive settings in there if running Drivespace (I don't like running it myself, too many things to go wrong).


Article ID:   W13154
Filename:   Find Windows Location on Remote Win95 Machine.txt
File Created: 1999:04:15:16:52:06
Last Updated: 1999:04:15:16:52:06