The SUBST command in Windows lets you substitute a drive letter for a pathname. For instance, the path c:program filessubstitute could be mapped to the drive letter F:.
NTSubst (http://www.hhdsoftware.com/ntsubst.html) is a freeware replacement for SUBST that expands on its functionality and adds several new features.
First, NTSubst can be used multiple times with a given drive letter. (SUBST only allows one substitution for a letter, period.) Each time a new path is assigned to a given drive letter, the old path is stored on a stack. For instance, if you need to run multiple programs that use the same path but require different path assignments for it, you can use NTSubst to cycle through each path assignment as needed.
NTSubst can also be used to replace mappings for existing drives, such as A: or C:. In the event that you need to run a program that requires a new mapping for an existing drive, you can do this. The original drive mapping can always be restored, of course. You should use this function carefully since you never know what can happen if you change your primary drive mappings in the middle of a session.
Another advanced feature NTSubst supports is the ability to map directly to any valid Object Manager path. Any device with a mapping such as Device[Devicename] in Object Manager can be mapped through NTSubst. For instance, to map the first floppy drive to X:, you could use the command:
NTSubst x: DeviceFloppy0
If you want to determine what Object Manager paths are available, Mark Russinovich at SysInternals has created a program called WinObj that lets you browse them graphically (available at http://www.sysinternals.com/ntw2k/freeware/winobj.shtml).
Remember that mapping a drive to an Object Manager path does not automatically imply that you can use the path as a file system, so be sure to use this function carefully.
Serdar Yegulalp is the editor of the Windows 2000 Power Users Newsletter. Check out his Windows 2000 blog for his latest advice and musings on the world of Windows network administrators -- please share your thoughts as well!
This was first published in December 2004