
Substituting Drive letters
Substituting Drive lettersVirtually any command that can be
successfully run from a command line ,Start/Run, shortcut or batch
file can be run in WSH by using the Run method of the Wscript.Shell
object.
Dim Shell
Set Shell = CreateObject("Wscript.Shell")
Shell.Run "subst y: h\%username%",0,True
In the log in scripts I wrote for work I do this in dos:
subst y: h:\%username%
How can I mimic that in Windows Scripts Host?