.. highlightlang:: us .. index:: ShellExecute .. _shellexecute: ShellExecute ============ .. us.tag ShellExecute NOTREADYGERMAN Programming.os New310 Changed5403 :ref:`ShellExecute` öffnet eine Datei in einem Programm. Es wird dazu das Programm gestartet, dass der Datei-Extension zugeordnet ist. .. function:: nErrorCode = ShellExecute(ssFile) nErrorCode = ShellExecute(ssFile, ssParams) nErrorCode = ShellExecute(ssFile, ssParams, ssOperation) nErrorCode = ShellExecute(ssFile, ssParams, ssOperation, ssDir) nErrorCode = ShellExecute(ssFile, ssParams, ssOperation, ssDir, nShow) .. us.return **Returnwert** Falls *nErrorCode* größer als 32 ist, war die Funktion erfolgreich, ansonsten ist ein Fehler aufgetreten. .. us.params **Parameter** .. uparam:: ssFile *ssFile* ist der vollständige Dateiname. .. uparam:: ssParams *ssParams* ist ein String der die Parameter enthält, die an die Appliktion übergeben werden sollen. .. uparam:: ssOperation *ssOperation* legt die Operation fest. Defaultwert ist ``open``. Andere Operationen: ``explore``, ``find``, ``print``. .. uparam:: ssDir *ssDir* ist ein Verzeichnisname, der das Arbeitsverzeichnis festlegt. .. uparam:: nShow *nShow* ist einer der folgenden Werte: ``SW_HIDE``, ``SW_SHOWNORMAL``, ``SW_NORMAL``, ``SW_SHOWMINIMIZED``, ``SW_SHOWMAXIMIZED``, ``SW_MAXIMIZE``, ``SW_SHOWNOACTIVATE``, ``SW_SHOW``, ``SW_MINIMIZE``, ``SW_SHOWMINNOACTIVE``, ``SW_SHOWNA``, ``SW_RESTORE``, ``SW_SHOWDEFAULT``, ``SW_FORCEMINIMIZE``, ``SW_MAX``. Defaultwert ist SW_SHOW. .. us.example **Beispiel** :: ShellExecute("d:\\test.xls"); // Opens the Windows Explorer ShellExecute("c:\\program files"); // Opens the Windows Explorer ShellExecute("c:\\program files"); // Opens notepad ShellExecute("notepad", "d:\\text.txt"); .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Beschreibung * - R2012.3 (5.40.3) - Neue Parameter 2 bis 5. .. seealso:: :ref:`uberblick-programmierung`, :ref:`system` :sub:`id-329545`