Add Visual Studio 2022 (Community/Professional/Enterprise) as Windows FMAs (#50717)
<!-- Add the related story/sub-task/bug number, like Resolves #123, or remove if NA --> **Related issue:** Resolves #50653 Adds **Visual Studio 2022 Community, Professional, and Enterprise** as Windows Fleet-maintained apps. customer-universitas needs all three editions. ## What's here - Three input files, one per edition, each pointing at its own winget package (`Microsoft.VisualStudio.2022.{Community,Professional,Enterprise}`, all at `17.14.37`). - A shared install script (`visual_studio_2022_install.ps1`) — the downloaded file is a ~4 MB bootstrapper, not the IDE. The real multi-GB payload downloads from Microsoft *during* the install script, so install time depends on the host's network speed and counts against Fleet's 1-hour software-install timeout. `--wait` is required or the bootstrapper forks the real install to a background process and returns almost immediately. - Three uninstall scripts (one per edition) that resolve the install path via `vswhere.exe -products Microsoft.VisualStudio.Product.<Edition>` and call `vs_installer.exe uninstall --installPath <path> --quiet --norestart --wait`, since VS has no normal `UninstallString`. - Both scripts map winget's documented `3010`/`1641` (reboot pending/initiated) to a successful exit, and fail clearly on `1001`/`1618` (another VS Installer operation already running). - Default install ships the bare IDE shell (no `--add` workloads) — matches plain `winget install` behavior, per the issue's own conclusion that this needs no special-casing. - Icons: no scriptable source (no Windows host to extract the real per-edition `.exe` icon, and Microsoft's own download pages don't expose one) turned up distinct Community/Professional/Enterprise badge art, so all three currently use the same public Visual Studio mark ([Wikimedia Commons](https://commons.wikimedia.org/wiki/File:Visual_Studio_Icon_2022.svg), marked public domain). **Flagging for #g-software Product Designer** to swap in the real per-edition badges if we have them. ## What I could not verify (no Windows host in this environment) - `unique_identifier`/publisher (`Visual Studio Community/Professional/Enterprise 2022`, publisher `Microsoft Corporation`) are taken from the winget locale manifest, not confirmed against a live registry entry. - The version-string quirk the issue calls out: winget's `AppsAndFeaturesEntries.DisplayVersion` is `"17.14.37 (July 2026)"`, not a clean version. I deliberately did **not** set `use_display_version_for_patch` — feeding that non-numeric string in as the patch target would break `version_compare` ordering across future version bumps (see the comment in `ingester.go`). Instead the patch policy compares against the plain winget `PackageVersion` (`17.14.37`), same as most winget FMAs. This should hold up if `version_compare` reads leading numeric-dot segments and ignores the trailing text, but I can't confirm that against real `programs.version` output without a host. - Whether `vs_installer.exe` actually honors `--wait` for `uninstall` the way the bootstrapper does for `install` — Microsoft's own docs say `--wait` "can only be passed into the bootstrapper; the installer (setup.exe) doesn't support it," which is in tension with the exact command this issue asked for and what I've seen used in the wild. Worth watching in validation logs. - End-to-end install timing on a normal (non-datacenter) connection, within the 1-hour timeout. # Checklist for submitter - [ ] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. <!-- Not added — no precedent for a changes file on FMA-addition PRs (e.g. #50553, TeamViewer Host). --> - [ ] Input data is properly validated, `SELECT *` is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters. - [ ] Timeouts are implemented and retries are limited to avoid infinite loops - [ ] If paths of existing endpoints are modified without backwards compatibility, checked the frontend/CLI for any necessary changes ## Testing - [x] `apps.json` is valid JSON with descriptions filled in for all three editions - [x] Generator output reviewed: exists/patched queries, SHA256 (matches the live winget manifest), installer URLs - [x] `go build`/`go test ./ee/maintained-apps/...` pass; no shared ingester/validator code changed - [ ] FMA validator: install → detect → uninstall on a Windows host — **pending, needs a Windows host** - [ ] QA'd all new/changed functionality manually — **pending, same reason** ## FMA-specific (from issue #50653's acceptance criteria) - [x] Edition scope decided and recorded on the issue (all three: Community, Professional, Enterprise) - [x] Input added under `ee/maintained-apps/inputs/winget/` - [x] Custom install script handles `3010`/`1641` as success and fails clearly on `1618`/`1001` - [x] Custom uninstall script resolves the install path via `vswhere` and calls `vs_installer.exe uninstall` - [ ] Identity fields verified against a real installed host — **not yet, see above** - [ ] Patch policy verified against actual `programs.version` — **not yet, see above** - [ ] Install verified end to end within the 1-hour timeout on a normal-speed connection — **not yet** - [ ] Passes the FMA validator: install → detect → uninstall — **not yet** - [x] Icon exists (shared placeholder mark across all three editions — flagged for PD) No shared/ingester/validator code changed. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added Visual Studio 2022 Community, Professional, and Enterprise editions to the software catalog. - Added support for installing and uninstalling each edition with quiet execution, installation detection, error handling, and reboot handling. - Added version 17.14.37 metadata and update detection. - Added Visual Studio branding and edition-specific icons throughout the software interface. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Allen Houchins <allenhouchins@mac.com>
This commit is contained in:
@@ -0,0 +1,62 @@
|
||||
# Visual Studio has no UninstallString; it's removed through the shared Visual
|
||||
# Studio Installer, which needs the specific instance's install path. -version
|
||||
# is required as well as -products, since product IDs are not version specific
|
||||
# and an unscoped query also matches a side-by-side Visual Studio 2026.
|
||||
|
||||
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
$vsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
|
||||
|
||||
try {
|
||||
|
||||
if (-not (Test-Path $vswhere) -or -not (Test-Path $vsInstaller)) {
|
||||
Write-Host "Visual Studio Installer not present, nothing to uninstall"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
$installPath = & $vswhere -products Microsoft.VisualStudio.Product.Community -version "[17.0,18.0)" -property installationPath
|
||||
|
||||
# vswhere reports failure through the exit code rather than by throwing, so
|
||||
# without this check a failed query looks like "no instance installed".
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "vswhere.exe failed with exit code $LASTEXITCODE"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
$installPath = ($installPath | Select-Object -First 1)
|
||||
|
||||
if (-not $installPath) {
|
||||
Write-Host "No Visual Studio Community 2022 instance found, nothing to uninstall"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
Write-Host "Found Visual Studio Community 2022 at: $installPath"
|
||||
|
||||
# The install path always contains spaces, so it has to be quoted here. No
|
||||
# --wait: it's bootstrapper-only, and Start-Process -Wait already blocks.
|
||||
$processOptions = @{
|
||||
FilePath = $vsInstaller
|
||||
ArgumentList = "uninstall --installPath `"$installPath`" --quiet --norestart"
|
||||
PassThru = $true
|
||||
Wait = $true
|
||||
}
|
||||
|
||||
$process = Start-Process @processOptions
|
||||
$exitCode = $process.ExitCode
|
||||
|
||||
if ($exitCode -eq 3010 -or $exitCode -eq 1641) {
|
||||
Write-Host "Uninstall exit code: $exitCode (succeeded, reboot required to finish)"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
if ($exitCode -eq 1001 -or $exitCode -eq 1618) {
|
||||
Write-Host "Uninstall failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Uninstall exit code: $exitCode"
|
||||
Exit $exitCode
|
||||
|
||||
} catch {
|
||||
Write-Host "Error: $_"
|
||||
Exit 1
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
# Visual Studio has no UninstallString; it's removed through the shared Visual
|
||||
# Studio Installer, which needs the specific instance's install path. -version
|
||||
# is required as well as -products, since product IDs are not version specific
|
||||
# and an unscoped query also matches a side-by-side Visual Studio 2026.
|
||||
|
||||
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
$vsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
|
||||
|
||||
try {
|
||||
|
||||
if (-not (Test-Path $vswhere) -or -not (Test-Path $vsInstaller)) {
|
||||
Write-Host "Visual Studio Installer not present, nothing to uninstall"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
$installPath = & $vswhere -products Microsoft.VisualStudio.Product.Enterprise -version "[17.0,18.0)" -property installationPath
|
||||
|
||||
# vswhere reports failure through the exit code rather than by throwing, so
|
||||
# without this check a failed query looks like "no instance installed".
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "vswhere.exe failed with exit code $LASTEXITCODE"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
$installPath = ($installPath | Select-Object -First 1)
|
||||
|
||||
if (-not $installPath) {
|
||||
Write-Host "No Visual Studio Enterprise 2022 instance found, nothing to uninstall"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
Write-Host "Found Visual Studio Enterprise 2022 at: $installPath"
|
||||
|
||||
# The install path always contains spaces, so it has to be quoted here. No
|
||||
# --wait: it's bootstrapper-only, and Start-Process -Wait already blocks.
|
||||
$processOptions = @{
|
||||
FilePath = $vsInstaller
|
||||
ArgumentList = "uninstall --installPath `"$installPath`" --quiet --norestart"
|
||||
PassThru = $true
|
||||
Wait = $true
|
||||
}
|
||||
|
||||
$process = Start-Process @processOptions
|
||||
$exitCode = $process.ExitCode
|
||||
|
||||
if ($exitCode -eq 3010 -or $exitCode -eq 1641) {
|
||||
Write-Host "Uninstall exit code: $exitCode (succeeded, reboot required to finish)"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
if ($exitCode -eq 1001 -or $exitCode -eq 1618) {
|
||||
Write-Host "Uninstall failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Uninstall exit code: $exitCode"
|
||||
Exit $exitCode
|
||||
|
||||
} catch {
|
||||
Write-Host "Error: $_"
|
||||
Exit 1
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
# Learn more about .exe install scripts:
|
||||
# http://fleetdm.com/learn-more-about/exe-install-scripts
|
||||
#
|
||||
# The downloaded file is a bootstrapper that pulls the multi-GB payload during
|
||||
# this step. --wait is required: without it the bootstrapper forks the real
|
||||
# install to a background process and returns before it finishes.
|
||||
|
||||
$exeFilePath = "${env:INSTALLER_PATH}"
|
||||
|
||||
try {
|
||||
|
||||
if (-not (Test-Path $exeFilePath)) {
|
||||
Write-Host "Error: Installer file not found at: $exeFilePath"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
$processOptions = @{
|
||||
FilePath = "$exeFilePath"
|
||||
ArgumentList = "--quiet --wait --norestart"
|
||||
PassThru = $true
|
||||
Wait = $true
|
||||
}
|
||||
|
||||
$process = Start-Process @processOptions
|
||||
$exitCode = $process.ExitCode
|
||||
|
||||
if ($exitCode -eq 3010 -or $exitCode -eq 1641) {
|
||||
Write-Host "Install exit code: $exitCode (succeeded, reboot required to finish)"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
if ($exitCode -eq 1001 -or $exitCode -eq 1618) {
|
||||
Write-Host "Install failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Install exit code: $exitCode"
|
||||
Exit $exitCode
|
||||
|
||||
} catch {
|
||||
Write-Host "Error: $_"
|
||||
Exit 1
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
# Visual Studio has no UninstallString; it's removed through the shared Visual
|
||||
# Studio Installer, which needs the specific instance's install path. -version
|
||||
# is required as well as -products, since product IDs are not version specific
|
||||
# and an unscoped query also matches a side-by-side Visual Studio 2026.
|
||||
|
||||
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
|
||||
$vsInstaller = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\setup.exe"
|
||||
|
||||
try {
|
||||
|
||||
if (-not (Test-Path $vswhere) -or -not (Test-Path $vsInstaller)) {
|
||||
Write-Host "Visual Studio Installer not present, nothing to uninstall"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
$installPath = & $vswhere -products Microsoft.VisualStudio.Product.Professional -version "[17.0,18.0)" -property installationPath
|
||||
|
||||
# vswhere reports failure through the exit code rather than by throwing, so
|
||||
# without this check a failed query looks like "no instance installed".
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
Write-Host "vswhere.exe failed with exit code $LASTEXITCODE"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
$installPath = ($installPath | Select-Object -First 1)
|
||||
|
||||
if (-not $installPath) {
|
||||
Write-Host "No Visual Studio Professional 2022 instance found, nothing to uninstall"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
Write-Host "Found Visual Studio Professional 2022 at: $installPath"
|
||||
|
||||
# The install path always contains spaces, so it has to be quoted here. No
|
||||
# --wait: it's bootstrapper-only, and Start-Process -Wait already blocks.
|
||||
$processOptions = @{
|
||||
FilePath = $vsInstaller
|
||||
ArgumentList = "uninstall --installPath `"$installPath`" --quiet --norestart"
|
||||
PassThru = $true
|
||||
Wait = $true
|
||||
}
|
||||
|
||||
$process = Start-Process @processOptions
|
||||
$exitCode = $process.ExitCode
|
||||
|
||||
if ($exitCode -eq 3010 -or $exitCode -eq 1641) {
|
||||
Write-Host "Uninstall exit code: $exitCode (succeeded, reboot required to finish)"
|
||||
Exit 0
|
||||
}
|
||||
|
||||
if ($exitCode -eq 1001 -or $exitCode -eq 1618) {
|
||||
Write-Host "Uninstall failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)"
|
||||
Exit 1
|
||||
}
|
||||
|
||||
Write-Host "Uninstall exit code: $exitCode"
|
||||
Exit $exitCode
|
||||
|
||||
} catch {
|
||||
Write-Host "Error: $_"
|
||||
Exit 1
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "Visual Studio Community 2022",
|
||||
"slug": "visual-studio-2022-community/windows",
|
||||
"package_identifier": "Microsoft.VisualStudio.2022.Community",
|
||||
"unique_identifier": "Visual Studio Community 2022",
|
||||
"exists_query": "SELECT 1 FROM programs WHERE (name = 'Visual Studio Community 2022' OR name LIKE 'Visual Studio Community 2022 (%') AND publisher = 'Microsoft Corporation';",
|
||||
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/visual_studio_2022_install.ps1",
|
||||
"uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/visual_studio_2022_community_uninstall.ps1",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "exe",
|
||||
"installer_scope": "machine",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "Visual Studio Enterprise 2022",
|
||||
"slug": "visual-studio-2022-enterprise/windows",
|
||||
"package_identifier": "Microsoft.VisualStudio.2022.Enterprise",
|
||||
"unique_identifier": "Visual Studio Enterprise 2022",
|
||||
"exists_query": "SELECT 1 FROM programs WHERE (name = 'Visual Studio Enterprise 2022' OR name LIKE 'Visual Studio Enterprise 2022 (%') AND publisher = 'Microsoft Corporation';",
|
||||
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/visual_studio_2022_install.ps1",
|
||||
"uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/visual_studio_2022_enterprise_uninstall.ps1",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "exe",
|
||||
"installer_scope": "machine",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "Visual Studio Professional 2022",
|
||||
"slug": "visual-studio-2022-professional/windows",
|
||||
"package_identifier": "Microsoft.VisualStudio.2022.Professional",
|
||||
"unique_identifier": "Visual Studio Professional 2022",
|
||||
"exists_query": "SELECT 1 FROM programs WHERE (name = 'Visual Studio Professional 2022' OR name LIKE 'Visual Studio Professional 2022 (%') AND publisher = 'Microsoft Corporation';",
|
||||
"install_script_path": "ee/maintained-apps/inputs/winget/scripts/visual_studio_2022_install.ps1",
|
||||
"uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/visual_studio_2022_professional_uninstall.ps1",
|
||||
"installer_arch": "x64",
|
||||
"installer_type": "exe",
|
||||
"installer_scope": "machine",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
]
|
||||
}
|
||||
@@ -9031,6 +9031,27 @@
|
||||
"unique_identifier": "com.install4j.1106-5897-7327-6550.5",
|
||||
"description": "Visual Paradigm is an UML, SysML, BPMN modelling platform."
|
||||
},
|
||||
{
|
||||
"name": "Visual Studio Community 2022",
|
||||
"slug": "visual-studio-2022-community/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "Visual Studio Community 2022",
|
||||
"description": "Visual Studio Community 2022 is a free, full-featured IDE from Microsoft for building apps across desktop, web, mobile, and cloud."
|
||||
},
|
||||
{
|
||||
"name": "Visual Studio Enterprise 2022",
|
||||
"slug": "visual-studio-2022-enterprise/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "Visual Studio Enterprise 2022",
|
||||
"description": "Visual Studio Enterprise 2022 is Microsoft's IDE for enterprise development teams, built for scale, security, and complex, high-impact projects."
|
||||
},
|
||||
{
|
||||
"name": "Visual Studio Professional 2022",
|
||||
"slug": "visual-studio-2022-professional/windows",
|
||||
"platform": "windows",
|
||||
"unique_identifier": "Visual Studio Professional 2022",
|
||||
"description": "Visual Studio Professional 2022 is Microsoft's IDE for professional developers working across desktop, web, mobile, and cloud."
|
||||
},
|
||||
{
|
||||
"name": "Microsoft Visual Studio Code",
|
||||
"slug": "visual-studio-code/darwin",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "17.14.37",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE (name = 'Visual Studio Community 2022' OR name LIKE 'Visual Studio Community 2022 (%') AND publisher = 'Microsoft Corporation';",
|
||||
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE ((name = 'Visual Studio Community 2022' OR name LIKE 'Visual Studio Community 2022 (%') AND publisher = 'Microsoft Corporation') AND version_compare(version, '17.14.37') < 0);"
|
||||
},
|
||||
"installer_url": "https://download.visualstudio.microsoft.com/download/pr/f7f5ecbc-83ca-4cf0-bdb2-aaf70efb6d97/065e93abcaf6a7ea97fa9a43561fc55bd57845d97b0cbf58c9be8cb72ddc1934/vs_Community.exe",
|
||||
"install_script_ref": "1662986f",
|
||||
"uninstall_script_ref": "e8264c65",
|
||||
"sha256": "065e93abcaf6a7ea97fa9a43561fc55bd57845d97b0cbf58c9be8cb72ddc1934",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"1662986f": "# Learn more about .exe install scripts:\n# http://fleetdm.com/learn-more-about/exe-install-scripts\n#\n# The downloaded file is a bootstrapper that pulls the multi-GB payload during\n# this step. --wait is required: without it the bootstrapper forks the real\n# install to a background process and returns before it finishes.\n\n$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\nif (-not (Test-Path $exeFilePath)) {\n Write-Host \"Error: Installer file not found at: $exeFilePath\"\n Exit 1\n}\n\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"--quiet --wait --norestart\"\n PassThru = $true\n Wait = $true\n}\n\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\nif ($exitCode -eq 3010 -or $exitCode -eq 1641) {\n Write-Host \"Install exit code: $exitCode (succeeded, reboot required to finish)\"\n Exit 0\n}\n\nif ($exitCode -eq 1001 -or $exitCode -eq 1618) {\n Write-Host \"Install failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)\"\n Exit 1\n}\n\nWrite-Host \"Install exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n",
|
||||
"e8264c65": "# Visual Studio has no UninstallString; it's removed through the shared Visual\n# Studio Installer, which needs the specific instance's install path. -version\n# is required as well as -products, since product IDs are not version specific\n# and an unscoped query also matches a side-by-side Visual Studio 2026.\n\n$vswhere = \"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\"\n$vsInstaller = \"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\setup.exe\"\n\ntry {\n\nif (-not (Test-Path $vswhere) -or -not (Test-Path $vsInstaller)) {\n Write-Host \"Visual Studio Installer not present, nothing to uninstall\"\n Exit 0\n}\n\n$installPath = & $vswhere -products Microsoft.VisualStudio.Product.Community -version \"[17.0,18.0)\" -property installationPath\n\n# vswhere reports failure through the exit code rather than by throwing, so\n# without this check a failed query looks like \"no instance installed\".\nif ($LASTEXITCODE -ne 0) {\n Write-Host \"vswhere.exe failed with exit code $LASTEXITCODE\"\n Exit 1\n}\n\n$installPath = ($installPath | Select-Object -First 1)\n\nif (-not $installPath) {\n Write-Host \"No Visual Studio Community 2022 instance found, nothing to uninstall\"\n Exit 0\n}\n\nWrite-Host \"Found Visual Studio Community 2022 at: $installPath\"\n\n# The install path always contains spaces, so it has to be quoted here. No\n# --wait: it's bootstrapper-only, and Start-Process -Wait already blocks.\n$processOptions = @{\n FilePath = $vsInstaller\n ArgumentList = \"uninstall --installPath `\"$installPath`\" --quiet --norestart\"\n PassThru = $true\n Wait = $true\n}\n\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\nif ($exitCode -eq 3010 -or $exitCode -eq 1641) {\n Write-Host \"Uninstall exit code: $exitCode (succeeded, reboot required to finish)\"\n Exit 0\n}\n\nif ($exitCode -eq 1001 -or $exitCode -eq 1618) {\n Write-Host \"Uninstall failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)\"\n Exit 1\n}\n\nWrite-Host \"Uninstall exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "17.14.37",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE (name = 'Visual Studio Enterprise 2022' OR name LIKE 'Visual Studio Enterprise 2022 (%') AND publisher = 'Microsoft Corporation';",
|
||||
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE ((name = 'Visual Studio Enterprise 2022' OR name LIKE 'Visual Studio Enterprise 2022 (%') AND publisher = 'Microsoft Corporation') AND version_compare(version, '17.14.37') < 0);"
|
||||
},
|
||||
"installer_url": "https://download.visualstudio.microsoft.com/download/pr/f7f5ecbc-83ca-4cf0-bdb2-aaf70efb6d97/2229b67966b6ae32a74599b68acc1d7d88bc21e93fcceb2f8c1c8253b6e92b29/vs_Enterprise.exe",
|
||||
"install_script_ref": "1662986f",
|
||||
"uninstall_script_ref": "4e3130f5",
|
||||
"sha256": "2229b67966b6ae32a74599b68acc1d7d88bc21e93fcceb2f8c1c8253b6e92b29",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"1662986f": "# Learn more about .exe install scripts:\n# http://fleetdm.com/learn-more-about/exe-install-scripts\n#\n# The downloaded file is a bootstrapper that pulls the multi-GB payload during\n# this step. --wait is required: without it the bootstrapper forks the real\n# install to a background process and returns before it finishes.\n\n$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\nif (-not (Test-Path $exeFilePath)) {\n Write-Host \"Error: Installer file not found at: $exeFilePath\"\n Exit 1\n}\n\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"--quiet --wait --norestart\"\n PassThru = $true\n Wait = $true\n}\n\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\nif ($exitCode -eq 3010 -or $exitCode -eq 1641) {\n Write-Host \"Install exit code: $exitCode (succeeded, reboot required to finish)\"\n Exit 0\n}\n\nif ($exitCode -eq 1001 -or $exitCode -eq 1618) {\n Write-Host \"Install failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)\"\n Exit 1\n}\n\nWrite-Host \"Install exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n",
|
||||
"4e3130f5": "# Visual Studio has no UninstallString; it's removed through the shared Visual\n# Studio Installer, which needs the specific instance's install path. -version\n# is required as well as -products, since product IDs are not version specific\n# and an unscoped query also matches a side-by-side Visual Studio 2026.\n\n$vswhere = \"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\"\n$vsInstaller = \"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\setup.exe\"\n\ntry {\n\nif (-not (Test-Path $vswhere) -or -not (Test-Path $vsInstaller)) {\n Write-Host \"Visual Studio Installer not present, nothing to uninstall\"\n Exit 0\n}\n\n$installPath = & $vswhere -products Microsoft.VisualStudio.Product.Enterprise -version \"[17.0,18.0)\" -property installationPath\n\n# vswhere reports failure through the exit code rather than by throwing, so\n# without this check a failed query looks like \"no instance installed\".\nif ($LASTEXITCODE -ne 0) {\n Write-Host \"vswhere.exe failed with exit code $LASTEXITCODE\"\n Exit 1\n}\n\n$installPath = ($installPath | Select-Object -First 1)\n\nif (-not $installPath) {\n Write-Host \"No Visual Studio Enterprise 2022 instance found, nothing to uninstall\"\n Exit 0\n}\n\nWrite-Host \"Found Visual Studio Enterprise 2022 at: $installPath\"\n\n# The install path always contains spaces, so it has to be quoted here. No\n# --wait: it's bootstrapper-only, and Start-Process -Wait already blocks.\n$processOptions = @{\n FilePath = $vsInstaller\n ArgumentList = \"uninstall --installPath `\"$installPath`\" --quiet --norestart\"\n PassThru = $true\n Wait = $true\n}\n\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\nif ($exitCode -eq 3010 -or $exitCode -eq 1641) {\n Write-Host \"Uninstall exit code: $exitCode (succeeded, reboot required to finish)\"\n Exit 0\n}\n\nif ($exitCode -eq 1001 -or $exitCode -eq 1618) {\n Write-Host \"Uninstall failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)\"\n Exit 1\n}\n\nWrite-Host \"Uninstall exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"version": "17.14.37",
|
||||
"queries": {
|
||||
"exists": "SELECT 1 FROM programs WHERE (name = 'Visual Studio Professional 2022' OR name LIKE 'Visual Studio Professional 2022 (%') AND publisher = 'Microsoft Corporation';",
|
||||
"patched": "SELECT 1 WHERE NOT EXISTS (SELECT 1 FROM programs WHERE ((name = 'Visual Studio Professional 2022' OR name LIKE 'Visual Studio Professional 2022 (%') AND publisher = 'Microsoft Corporation') AND version_compare(version, '17.14.37') < 0);"
|
||||
},
|
||||
"installer_url": "https://download.visualstudio.microsoft.com/download/pr/f7f5ecbc-83ca-4cf0-bdb2-aaf70efb6d97/119dd0785334e307d2df472373f0cdfeb6174c8cc895ae12e9157cfb65527ad0/vs_Professional.exe",
|
||||
"install_script_ref": "1662986f",
|
||||
"uninstall_script_ref": "ea7440c0",
|
||||
"sha256": "119dd0785334e307d2df472373f0cdfeb6174c8cc895ae12e9157cfb65527ad0",
|
||||
"default_categories": [
|
||||
"Developer tools"
|
||||
]
|
||||
}
|
||||
],
|
||||
"refs": {
|
||||
"1662986f": "# Learn more about .exe install scripts:\n# http://fleetdm.com/learn-more-about/exe-install-scripts\n#\n# The downloaded file is a bootstrapper that pulls the multi-GB payload during\n# this step. --wait is required: without it the bootstrapper forks the real\n# install to a background process and returns before it finishes.\n\n$exeFilePath = \"${env:INSTALLER_PATH}\"\n\ntry {\n\nif (-not (Test-Path $exeFilePath)) {\n Write-Host \"Error: Installer file not found at: $exeFilePath\"\n Exit 1\n}\n\n$processOptions = @{\n FilePath = \"$exeFilePath\"\n ArgumentList = \"--quiet --wait --norestart\"\n PassThru = $true\n Wait = $true\n}\n\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\nif ($exitCode -eq 3010 -or $exitCode -eq 1641) {\n Write-Host \"Install exit code: $exitCode (succeeded, reboot required to finish)\"\n Exit 0\n}\n\nif ($exitCode -eq 1001 -or $exitCode -eq 1618) {\n Write-Host \"Install failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)\"\n Exit 1\n}\n\nWrite-Host \"Install exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n",
|
||||
"ea7440c0": "# Visual Studio has no UninstallString; it's removed through the shared Visual\n# Studio Installer, which needs the specific instance's install path. -version\n# is required as well as -products, since product IDs are not version specific\n# and an unscoped query also matches a side-by-side Visual Studio 2026.\n\n$vswhere = \"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\vswhere.exe\"\n$vsInstaller = \"${env:ProgramFiles(x86)}\\Microsoft Visual Studio\\Installer\\setup.exe\"\n\ntry {\n\nif (-not (Test-Path $vswhere) -or -not (Test-Path $vsInstaller)) {\n Write-Host \"Visual Studio Installer not present, nothing to uninstall\"\n Exit 0\n}\n\n$installPath = & $vswhere -products Microsoft.VisualStudio.Product.Professional -version \"[17.0,18.0)\" -property installationPath\n\n# vswhere reports failure through the exit code rather than by throwing, so\n# without this check a failed query looks like \"no instance installed\".\nif ($LASTEXITCODE -ne 0) {\n Write-Host \"vswhere.exe failed with exit code $LASTEXITCODE\"\n Exit 1\n}\n\n$installPath = ($installPath | Select-Object -First 1)\n\nif (-not $installPath) {\n Write-Host \"No Visual Studio Professional 2022 instance found, nothing to uninstall\"\n Exit 0\n}\n\nWrite-Host \"Found Visual Studio Professional 2022 at: $installPath\"\n\n# The install path always contains spaces, so it has to be quoted here. No\n# --wait: it's bootstrapper-only, and Start-Process -Wait already blocks.\n$processOptions = @{\n FilePath = $vsInstaller\n ArgumentList = \"uninstall --installPath `\"$installPath`\" --quiet --norestart\"\n PassThru = $true\n Wait = $true\n}\n\n$process = Start-Process @processOptions\n$exitCode = $process.ExitCode\n\nif ($exitCode -eq 3010 -or $exitCode -eq 1641) {\n Write-Host \"Uninstall exit code: $exitCode (succeeded, reboot required to finish)\"\n Exit 0\n}\n\nif ($exitCode -eq 1001 -or $exitCode -eq 1618) {\n Write-Host \"Uninstall failed: another Visual Studio Installer operation is already in progress (exit code $exitCode)\"\n Exit 1\n}\n\nWrite-Host \"Uninstall exit code: $exitCode\"\nExit $exitCode\n\n} catch {\n Write-Host \"Error: $_\"\n Exit 1\n}\n"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1062,6 +1062,7 @@ import VirtualBox from "./VirtualBox";
|
||||
import VirtualBuddy from "./VirtualBuddy";
|
||||
import Viscosity from "./Viscosity";
|
||||
import VisualParadigm from "./VisualParadigm";
|
||||
import VisualStudio2022 from "./VisualStudio2022";
|
||||
import VisualStudioCode from "./VisualStudioCode";
|
||||
import Vivaldi from "./Vivaldi";
|
||||
import VividApp from "./VividApp";
|
||||
@@ -2232,6 +2233,9 @@ export const SOFTWARE_NAME_TO_ICON_MAP = {
|
||||
viscosity: Viscosity,
|
||||
"visual paradigm": VisualParadigm,
|
||||
"visual studio code": VisualStudioCode,
|
||||
"visual studio community 2022": VisualStudio2022,
|
||||
"visual studio enterprise 2022": VisualStudio2022,
|
||||
"visual studio professional 2022": VisualStudio2022,
|
||||
vivaldi: Vivaldi,
|
||||
vivid: VividApp,
|
||||
viz: Viz,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.9 KiB |
Reference in New Issue
Block a user