In the install.bat file you're getting to the documents folder by building up the path using the username. Unfortunately this isn't always the case. Also the C drive is not necessarily where the user's home folder resides.
I suggest changing the 6th line from this:
set "D=C:\Users\%USERNAME%\Documents\Visual Studio 2015\Templates\ProjectTemplates"
to this:
set "D=%userprofile%\Documents\Visual Studio 2015\Templates\ProjectTemplates"
That should at least help where the user's home folder isn't in the usual position (or named the same as the username).
What is a bit cumbersome though is if the Documents folder under that has been relocated. Unfortunately the only place this is available is in registry. Else you can get to it using vbscript / powershell.
Here's a way of using powershell inside of a BAT file:
set T="%TEMP%\docspath.tmp"
powershell -Command "[Environment]::GetFolderPath('MyDocuments') | Out-File '%T%' -Encoding ascii"
set /p DOCSPATH=< "%T%"
del "%T%"
Thereafter the line above can be changed to this instead:
set "D=%DOCSPATH%\Visual Studio 2015\Templates\ProjectTemplates"
Though it just feels way too complicated for my taste.
In the install.bat file you're getting to the documents folder by building up the path using the username. Unfortunately this isn't always the case. Also the C drive is not necessarily where the user's home folder resides.
I suggest changing the 6th line from this:
That should at least help where the user's home folder isn't in the usual position (or named the same as the username).
What is a bit cumbersome though is if the Documents folder under that has been relocated. Unfortunately the only place this is available is in registry. Else you can get to it using vbscript / powershell.
Here's a way of using powershell inside of a BAT file:
Thereafter the line above can be changed to this instead:
Though it just feels way too complicated for my taste.