I had some fun with netdrive and made a gentoo ebuild repo to provide netdrive as a systemd service which can be found here:
https://github.com/ccharon/netdrive
After everything worked to my liking on the server side I switched over to the client and wanted a convenient netdrive setup at boot. The problem there is, sometimes I boot with a scsi zipdrive so the drive letter of the first netdrive is moving.
To be able to find the netdrive i thought of something like this (in autoexec.bat)
(typed from memory so it might be slighly off)
...
C:\TOOLS\FNDRV.EXE /L NOTATTACHED
C:\NET\NETDRIVE CONNECT myserver:8086 disk.dsk %FNDRV%
...
So there is a tool needed that is called FNDRV.EXE that accepts a Label as parameter and then puts the first drive letter with the correct label into an env variable FNDRV so i can use it.
so I made a lib to write into the environemt and the fndrv.exe that enumerates the drives and looks for labels.
Lib: https://github.com/ccharon/dos-programming/bl … VIRO/ENVIRO.PAS
FNDRV: https://github.com/ccharon/dos-programming/bl … NVIRO/FNDRV.PAS
The program is tested on MSDOS 6.22 with command. com as shell (4dos is not working)
Why am I writing all this?
Because I can find every Drive by label except the netdrive provided drives ... int 21h, ah=44h, al=0dh dos call does not seem to find drive details. (this part of the code:
https://github.com/ccharon/dos-programming/bl … DRV.PAS#L41-L80)
using DIR F: for example i can see the not connected drive with the label NOTATTACHED but my program can not find it by its label using the dos interrupt calls.
Has anyone delved deep enough in this rabbit hole to provide suggestions? hehe maybe i can even "ask" the netdrive TSR for the first drive letter?
All i want to do is to know which drive letter is the first netdrive 😜
All code compiles and runs under Turbo Pascal 7 for DOS