VSIXInstaller Portability or Instant folder location

Fleµve Relentless.resærch.lab 81 Reputation points
2024-01-09T17:43:12.38+00:00

Hello.

I've build a Setup executable (c++ win32), who deploy files and Install VSIX. The problem with time it's VSIXInstaller become more and more non-portable. At beginning some dll and a simple VSIXInstaller.exe.config fix and everything is fine. Now It's total nightmare. I can't pack VSIXInstaller inside my Setup to install and desinstall VSIX.

Presently inside my setup, I use CreateProcess to execute VSIXInstaller.exe and with CreateProcess you need to point an executable and also CreateProcess provide a WAIT style (I've more than one VSIX to install).

I've try to call "Cmd /c AtmelWizard.vsix" inside CreateProcess, but i lost WAIT effect.

Also "Cmd /c Start /wait Atmelwizard.vsix".. prompt a empty command box...
Anyway i really need VSIXInstaller.exe (who actually work).

But Impossible to move out VSIXInstaller.exe from is original folder.
Then the only easier way has to point VSIXInstaller.exe location.. but you know with time, Visual Studio edition/version detection was another thing made without standard.. from 2010,2015,2017,2019,2022.... Ok, I must admit 2022 was base standard, cause of 64bit VSIX Extension.

How to detect Visual studio 2022+ properly and get devenv.exe folder location?

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
228 questions
{count} votes

Accepted answer
  1. gekka 9,746 Reputation points MVP
    2024-01-10T09:53:10.3966667+00:00

    Detecting existing Visual Studio instances

    As an example, if you use vswhere, It can be assumed that it is always placed at "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe", so you can find it by execute it and reading the productPath.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.