On my PC I have created a system environment variable called 3DSMaxInstallDirectory
At the command line, if I give
echo %3DSMaxInstallDirectory%Plugins\
I get
D:\Program Files\Autodesk\3ds Max 2011\Plugins\
In Visual Studio I enter into the Post-Build section
copy "$(TargetDir)$(TargetName).*" "$(3DSMaxInstallDirectory)Plugins\"
However on build I get
Error 4 The command "copy "C:\Users\Sebastian\Documents\Visual Studio 2010\Projects\MaxBridge\MaxBridgeImporterPlugin\bin\Debug\MaxBridgePlugin.*" "Plugins\"
" exited with code 1. MaxBridgeImporterPlugin
The results on Google are a confusing mix of suggestions that Visual Studio doesn't support EVs, Visual Studio does support EVs, Visual Studio needs %..% and Visual Studio needs $(..) - and none of which seem to work on my computer.
What is the correct way to use my environment variable in Visual Studio?
(Yes, the directory exists, and the reason I don't want to set the path explicitly is I am preparing to share this project, and every step someone else has to take after downloading and before building is another barrier.)