Why is a subst drive usable from a command prompt but not Windows 7 explorer
This probably happens because the run command runs elevated (as administrator). If you run the subst command not elevated you will see it in Windows Explorer. You can test this running the subst on an elevated command prompt.
This command creates a persistent Z: subst of C:\DirectoryName
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices" /v Z: /t REG_SZ /d "\??\C:\DirectoryName" /f