Ich habe ein seltsames Problem mit meinem SolidWorks 2024-Paket. Es lässt sich problemlos installieren und deinstallieren. Wenn ich es jedoch auf demselben PC neu installieren möchte, wird die Installation nur scheinbar ausgeführt. Die `install()`-Funktion des Pakets gibt keinen Fehler zurück (die Protokollierung ist deaktiviert), aber es wird tatsächlich nichts neu installiert. Führe ich eine manuelle Installation derselben SolidWorks-Version durch, wird diese problemlos auf dem Rechner installiert.
Hier ist die setup.py-Datei:
Code: Alle auswählen
# -*- coding: utf-8 -*-
from setuphelpers import *
app_name = 'SOLIDWORKS 2024'
app_dir = makepath(programfiles, 'SOLIDWORKS Corp')
app_dir_binaries = makepath(app_dir,'SOLIDWORKS')
binary_name = "SLDWORKS.exe"
kill_list = [binary_name]
def install():
print('Installation de : %s' % control.name)
install_exe_if_needed(r'SW2024\startswinstall.exe',silentflags='/install /now',timeout=1800)
def uninstall():
# Remove software and all dependances installed by my custom Administrative SolidWorks Image. You should probably adapt this function to your Administrative Image.
print('Uninstalling CEF for SOLIDWORKS Applications')
run_notfatal(r'MsiExec.exe /X{A3731044-38ED-44A1-AA43-0819B422AADB} /passive /norestart')
print('Uninstalling SOLIDWORKS 2024 French Resources')
run_notfatal(r'MsiExec.exe /X{12E5ACE4-6D44-444C-BCA4-679A861D0711} /passive /norestart')
print('Uninstalling SOLIDWORKS eDrawings 2024 SP02.1')
run_notfatal(r'MsiExec.exe /X{3835B6E2-CC35-4F45-900A-5AE9772B8B24} /passive /norestart')
print('Uninstalling SOLIDWORKS Flow Simulation 2024 SP02.1')
run_notfatal(r'MsiExec.exe /X{5D202678-5697-45BE-B4DF-3208EBFE8415} /passive /norestart')
print(r'Desinstallation de SOLIDWORKS 2024 SP02.1')
run_notfatal(r'MsiExec.exe /X{E9661DF2-E1B0-423F-BFFA-1A6EF0B1307B} /passive /norestart')
print(r'Uninstalling SolidWorks Installation Manager 20240-40200-1100-100')
run_notfatal(r'"C:\WINDOWS\SolidWorks\IM_20240-40200-1100-100\sldim\sldim.exe" /remove "C:\WINDOWS\SolidWorks\IM_20240-40200-1100-100\sldim\sldIM_installed.xml"')
if reg_key_exists(HKEY_LOCAL_MACHINE,r'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\SolidWorks Installation Manager 20240-40200-1100-100'):
registry_deletekey(HKEY_LOCAL_MACHINE,r'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall',r'SolidWorks Installation Manager 20240-40200-1100-100')
remove_tree(r'C:\Windows\Solidworks')
print(r'Remove extra folders and data')
remove_tree(r'C:\Program Files\SOLIDWORKS Corp')
remove_tree(r'C:\SOLIDWORKS Data')
remove_tree(r'C:\ProgramData\SOLIDWORKS')
remove_tree(r'C:\Windows\Solidworks')
def audit():
return("OK")NACHTRAG: Ich vermute, das Problem liegt an der fehlenden Datei „SW2024\64bit\sldim\admin.dat“, die ich aus dem Paket entfernt habe, da sie einen SHA-Fehler (vermutlich durch eine Antiviren-Erkennung) verursachte. Sie sollte direkt vor der Installation im Ordner „SW2024“ neu erstellt werden.
