Visual Studio Community 2022
Veröffentlicht: 1. September 2026 - 20:12 Uhr
Guten Morgen,
Ich stoße gelegentlich auf Installationsfehler bei diesem Paket:
https://wapt.tranquil.it/store/fr/tis-v ... -community
Hier ist die betreffende Funktion:
Tatsächlich gibt installed_softwares(name=app_name) manchmal Folgendes zurück:
Dass dies aber nicht existiert:
Um das Problem zu beheben, muss ich den Registrierungseintrag des Deinstallationsprogramms mithilfe der unten stehenden Befehle entfernen, anschließend die in der Deinstallationsfunktion angegebenen Ordner sowie den Ordner „localVSlayout“ löschen:
Wäre es möglich, Folgendes zu def uninstall() hinzuzufügen?
Oder vielleicht wäre es besser, es auf diese Weise in der Installationsfunktion zu testen:
Ich stoße gelegentlich auf Installationsfehler bei diesem Paket:
https://wapt.tranquil.it/store/fr/tis-v ... -community
Code: Alle auswählen
Traceback (most recent call last):
File "C:\Program Files (x86)\wapt\common.py", line 4534, in install_wapt
exitstatus = setup.install()
File "C:\Program Files (x86)\wapt\private\tmp\waptb94tqg96\setup.py", line 102, in install
File "C:\Program Files (x86)\wapt\common.py", line 4451, in new_func
return func(*args, **kwargs)
File "C:\Program Files (x86)\wapt\setuphelpers_windows.py", line 1746, in install_exe_if_needed
error('setup exe file %s not found in package' % exe)
File "C:\Program Files (x86)\wapt\waptutils.py", line 2198, in error
raise EWaptSetupException('Fatal error : %s' % reason)
waptutils.EWaptSetupException: Fatal error : setup exe file C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe not found in package
EWaptSetupException: Fatal error : setup exe file C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe not found in packageHier ist die betreffende Funktion:
Code: Alle auswählen
# Upgrading the software
[b]if installed_softwares(name=app_name) and need_install(name=app_name, min_version=control.get_software_version()):[/b]
[b] bin_path = makepath(programfiles32, "Microsoft Visual Studio", "Installer", "setup.exe")[/b]
install_exe_if_needed(
bin_path,
# /finalizeInstall --passive or --quiet
silentflags=r'update --layoutPath "C:\localVSlayout" --in "C:\localVSlayout\Response.json" --force --nocache --noUpdateInstaller --noWeb --quiet --norestart',
name=app_name,
min_version=control.get_software_version(),
get_version = get_version,
timeout=2500,
# time_wait_uninstallkey_present=5000,
)Tatsächlich gibt installed_softwares(name=app_name) manchmal Folgendes zurück:
Code: Alle auswählen
>>> from setuphelpers import *
>>> bin_name = "vs_setup.exe"
>>> app_name = "Visual Studio Community 2022"
>>> dir_name = "localVSlayout"
>>> temp_dir = makepath(systemdrive, dir_name)
>>> app_dir = makepath(programfiles,"Microsoft Visual Studio","2022")
>>>[b] installed_softwares(name=app_name)[/b]
[{'key': '908e4091', 'name': 'Visual Studio Community 2022', 'version': '17.14.36', 'install_date': '2026-07-15 00:00:00', 'install_location': 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community', 'uninstall_string': '"C:\\Program Files (x86)\\Microsoft Visual Stud
io\\Installer\\setup.exe" uninstall --installPath "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community"', 'publisher': 'Microsoft Corporation', 'system_component': 0, 'win64': False}]Code: Alle auswählen
C:\Windows\System32\config\systemprofile>dir "c:\Program Files (x86)\Microsoft Visual Studio\
Le volume dans le lecteur C s’appelle Windows
Le numéro de série du volume est 60CB-EC76
Répertoire de c:\Program Files (x86)\Microsoft Visual Studio
29/07/2026 11:34 <DIR> .
01/09/2026 19:19 <DIR> ..
15/07/2026 16:13 <DIR> Shared
0 fichier(s) 0 octets
3 Rép(s) 176 418 471 936 octets libresUm das Problem zu beheben, muss ich den Registrierungseintrag des Deinstallationsprogramms mithilfe der unten stehenden Befehle entfernen, anschließend die in der Deinstallationsfunktion angegebenen Ordner sowie den Ordner „localVSlayout“ löschen:
Code: Alle auswählen
>>> soft = installed_softwares(name="Visual Studio Community 2022")
>>> soft
[{'key': '908e4091', 'name': 'Visual Studio Community 2022', 'version': '17.14.36', 'install_date': '2026-07-15 00:00:00', 'install_location': 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community', 'uninstall_string': '"C:\\Program Files (x86)\\Microsoft Visual Stud
io\\Installer\\setup.exe" uninstall --installPath "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community"', 'publisher': 'Microsoft Corporation', 'system_component': 0, 'win64': False}]
>>> unregister_uninstall(soft[0]["key"])
>>> installed_softwares(name="Visual Studio Community 2022")
[]
>>>
Code: Alle auswählen
soft = installed_softwares(name="Visual Studio Community 2022")
if soft:
unregister_uninstall(soft[0]["key"])[/b]Code: Alle auswählen
if installed_softwares(name=app_name) and need_install(name=app_name, min_version=control.get_software_version()):
bin_path = makepath(programfiles32, "Microsoft Visual Studio", "Installer", "setup.exe")
if isfile(bin_path):
install_exe_if_needed(
bin_path,
# /finalizeInstall --passive or --quiet
silentflags=r'update --layoutPath "C:\localVSlayout" --in "C:\localVSlayout\Response.json" --force --nocache --noUpdateInstaller --noWeb --quiet --norestart',
name=app_name,
min_version=control.get_software_version(),
get_version = get_version,
timeout=2500,
# time_wait_uninstallkey_present=5000,
)