Advertisement
ZorbaTHut

Untitled

Apr 19th, 2015
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. @ECHO off
  2.  
  3. SET VSComnToolsPath=
  4. SET TmpPath=""
  5.  
  6. REM Non-express VS2013 on 64-bit machine.
  7. FOR /f "tokens=2,*" %%A IN ('REG.exe query HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%1.0 /v "InstallDir" 2^>Nul') DO (
  8. SET TmpPath="%%B\..\Tools"
  9. )
  10.  
  11. REM Non-express VS2013 on 32-bit machine.
  12. IF %TmpPath% == "" (
  13. FOR /f "tokens=2,*" %%A IN ('REG.exe query HKLM\Software\Microsoft\VisualStudio\%1.0 /v "InstallDir" 2^>Nul') DO (
  14. SET TmpPath="%%B\..\Tools"
  15. )
  16. )
  17.  
  18. REM Express VS2013 on 64-bit machine.
  19. IF %TmpPath% == "" (
  20. FOR /f "tokens=2,*" %%A IN ('REG.exe query HKLM\Software\Wow6432Node\Microsoft\WDExpress\%1.0 /v "InstallDir" 2^>Nul') DO (
  21. SET TmpPath="%%B\..\Tools"
  22. )
  23. )
  24.  
  25. REM Express VS2013 on 32-bit machine.
  26. IF %TmpPath% == "" (
  27. FOR /f "tokens=2,*" %%A IN ('REG.exe query HKLM\Software\Microsoft\WDExpress\%1.0 /v "InstallDir" 2^>Nul') DO (
  28. SET TmpPath="%%B\..\Tools"
  29. )
  30. )
  31.  
  32. IF NOT %TmpPath% == "" (
  33. CALL :normalisePath %TmpPath%
  34. )
  35.  
  36. GOTO :EOF
  37.  
  38. :normalisePath
  39. SET VSComnToolsPath=%~f1
  40. GOTO :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement