What might cause "subst" to say "Invalid Parameter - D:"?
Solution 1:
If you get the following error message when running subst:
Invalid parameter
I would suggest initially checking if the drive you are referencing is already in use by the system. To check, in the same command prompt as the one you you are running subst run the command:
wmic logicaldisk get name
The output of this will be something like:
Name
C:
D:
E:
Note: For a drive that is already created with subst you will get the error:
Drive already SUBSTed
Solution 2:
The short answer is D: already exists. Try something like subst C: F:\temo and you get the "Invalid Parameter - C:". Can't do it because it already exists and hence the error.
Solution 3:
I also had this issue with a batch script which used the subst X: %CD%
command.
Turned out it was placed in a directory with a space in the name.
Directory renamed, issue solved