VOGONS


First post, by ruthan

User metadata
Rank Oldbie
Rank
Oldbie

Hello,
i want to replace primary executable for some command which are already par of MS-DOS 7.1, how to do it?

For example there is ping in MS-DOS 7.1, which Windows only, so i get that is possible run program under DOS error message, mTCP stuck has own ping, which is working under DOS.. but its annoying that i have to go to its directory and run it from it. How to replace deafult ping.exe for with new one? Need its about path variable (i have C:\Windows as first item in the list) or how to do that?

Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough raw HW.

Reply 2 of 11, by ruthan

User metadata
Rank Oldbie
Rank
Oldbie
mrau wrote:

amend path

How exactly?

Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough raw HW.

Reply 3 of 11, by Jo22

User metadata
Rank l33t++
Rank
l33t++

The PATH= variable has a most-important to least-important order.
If you've got two ping.exe files and you're at C:\>, the one in the first directory listed in PATH= is executed.
However, there's also an order for *.exe,*.com,*.bat files.
Unfortunately, I can't remember it at the moment.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 4 of 11, by ruthan

User metadata
Rank Oldbie
Rank
Oldbie

I tried to change path order, but it does not seem to work. Ping which i want to use in C:\Drivers\mTCP directory.

@SET PATH=C:\DRIVERS\FW;C:\DRIVERS;C:\DRIVERS\QEMM;C:\DRIVERS\mTCP;C:\Drivers\SHSUCD;C:\WINDOWS;

Windows ping is still executed after ping.exe execution.

Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough raw HW.

Reply 5 of 11, by chinny22

User metadata
Rank l33t++
Rank
l33t++

The order is com, exe, bat
your path looks correct, but if you wanted to cheat you could rename/delete windows ping and copy mtcp's ping into the c:\windows\command folder.

This is where I always stick pkunzip and mouse.com for the exact same reason, rather then adding yet another folder to path

Reply 6 of 11, by ruthan

User metadata
Rank Oldbie
Rank
Oldbie

Hmm, if order would be bat > exe , it would be easy to create new bat to fix it.

If path is not solution, maybe is there something for hiding the files, or virtually replace file name for 1 session or other workaround. I dont want to physically rewire or rename files, because you using same partition for Windows 98 too.

Im old goal oriented goatman, i care about facts and freedom, not about egos+prejudices. Hoarding=sickness. If you want respect, gain it by your behavior. I hate stupid SW limits, SW=virtual world, everything should be possible if you have enough raw HW.

Reply 7 of 11, by chinny22

User metadata
Rank l33t++
Rank
l33t++

you could always specify which ping your after by typing ping.exe
That'll ignore ping.com in wondows\command (I'm pretty sure is a .com in windows?

or you can create a bat file that calls up C:\Drivers\mTCP\ping.exe
call it something like ping1.bat and just remember type ping1 not ping each time

Reply 8 of 11, by AlaricD

User metadata
Rank Oldbie
Rank
Oldbie

The default extension preference order is .COM, then .EXE, then .BAT. Putting .BAT last prevents Joe Jerkface from putting a win.bat in your WIndows directory when you're not looking, the contents of which will then deltree /y c:\windows; win.com will be executed instead if you just type "win".

Internal commands will also have priority over externals, if you just type "cd Windows" it will execute the internal command "cd" instead of executing any file regardless of the extension.

"The Big Bang. The ultimate hero of low frequency. The divine intergalactical bass drum connecting the tribes of our solar system."
Yello
"Solar Driftwood"

Reply 11 of 11, by peterferrie

User metadata
Rank Oldbie
Rank
Oldbie

The com vs exe vs bat matters only for files of the same name in the same directory.
The path will be traversed only once, so "win.bat" earlier in the path will still run before "win.com".
If you remove the "C:\WINDOWS" from the path, and then type "PING", does the mTCP Ping run?