Discussion Locked

substs command in Win2000

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm helping a client w/a commercial application, that according to the manufacturer requires a "G" & "H" drive that are directories. The program is in "G" & the db in "H" I tried setting the substs commands in the autoexec.bat, but Win2000 doesn't read it at boot so I moved it to the startup section of program menu. This works, but doesn't share the two drives. The win2000 system is the server/workstation connected to 3 win95 systems. How can I set this up at boot or tell my batch file to sharethe drives?? what about a script in the startup script?

5 replies

by nmead

What about using the autoexec.nt file to subst and share out drives from there?

hth,
Nate

by teke

Sorry, I should have mentioned that I rried this early on and Win200 crashed! I hade to reinstall it.

by nmead

Ok then, copy and paste this script into a .cmd file and put a shortcut into the All Users -> StartUp Section of the Start Menu.

subst G: /d >NUL: 2>&1
subst H: /d >NUL: 2>&1
subst G: "D:\Program Files\AppDir" >NUL: 2>&1
subst H: D:\downloads >NUL: 2>&1
net share G:=App >NUL: 2>&1
net share H:=DB >NUL: 2>&1

The ">NUL: 2>1" just hides the output of the script. Change the App and DB sharenames to whatever that application needs. You could also modify this script to apply perms on those dirs.

BTW: tell the App Vendor to get with program and stop 'Hard-Coding' Paths into their Apps...

hth,
Nate

This discussion is closed to new replies.