summaryrefslogtreecommitdiff
path: root/Tools/vs_cmdline.vbs
blob: 65bd0e5ca60530a58eaba74b75b503c0e593d17a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Dim strCmdLine, strTemp
Set WshShell = Wscript.CreateObject("Wscript.Shell")

On Error Resume Next
strCmdLine = WshShell.RegRead("HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\InstallDir")
' In case of error assume WoW64 case
If Err <> 0 Then
  On Error Goto 0
  strCmdLine = WshShell.RegRead("HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\InstallDir")
End If

On Error Goto 0
strCmdLine = chr(34) + strCmdLine + "devenv.com" + chr(34)
For i = 0 to (Wscript.Arguments.Count - 1)
  strTemp = Wscript.Arguments(i)
  If InStr(strTemp, " ") Or InStr(strTemp, "|") Then
      strCmdLine = strCmdLine + " " + chr(34) + strTemp + chr(34)
  Else
      strCmdLine = strCmdLine + " " + strTemp
  End If
Next

WScript.Echo strCmdLine + vbCrLf