According to this blog you can find the path in the registry or by using the %vs###comntools% environment variable.
Function GetVSIDEPath
Exch $0
Push $1
Push $2
ExpandEnvStrings $1 "%VS$0COMNTOOLS%"
IfFileExists "$1\?" "" tryReg
GetFullPathName $1 "$1\..\..\IDE\"
IfFileExists "$1\?" done
tryReg:
IntOp $0 $0 / 10
ReadRegStr $1 HKLM "SOFTWARE\Microsoft\VisualStudio\$0.0" "InstallDir"
done:
StrCpy $0 $1
Pop $2
Pop $1
Exch $0
FunctionEnd
!include LogicLib.nsh
Section
Push 100 ; Visual Studio 2010
Call GetVSIDEPath
Pop $0
${If} $0 != ""
ExecWait '"$0\vsixInstaller.exe" /u:12345678-1234-5678-1234-123456780000'
${EndIf}
SectionEnd
If you support more than one version of Visual Studio you have to call GetVSIDEPath+ExecWait multiple times...