This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
userspace:winscp [2012/06/19 10:57] tobias |
userspace:winscp [2021/08/23 08:37] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ======ImportCert====== | + | ====== |
| - | Script by tobias | + | Script by Der-Matze |
| Comments and improvements welcome \\ | Comments and improvements welcome \\ | ||
| - | Tested with opsi 4.0.2 \\ | + | Tested with opsi 4.0.1 \\ |
| - | Tested with opsi-winst 4.11.2.5 \\ | + | Tested with opsi-winst |
| - | Tested with Windows 7 Enterprise | + | Tested with Windows XP Professional and Windows 7 Enterprise |
| - | Import des opsiclientd Zertifikats | + | Installation / Uninstallation |
| - | Das Script | + | |
| - | Nach diesem Vorgang wird keine Zertifikatswarnung mehr angezeigt. | + | |
| - | Damit dies Script funktioniert, | + | |
| - | Achtung: Firefox verwendet nicht den Windows Zertifikatsspeicher ! | + | This script uses the check_innosetup-exitcode script: https:// |
| - | ==== import.ins ==== | + | The installation file can be downloaded from: http:// |
| + | |||
| + | |||
| + | |||
| + | ==== Install.ins ==== | ||
| <code winst> | <code winst> | ||
| - | [initial] | + | [Initial] |
| - | message " | + | |
| + | ;Standard Text, der während der Installation angezeigt wird / Standardtext shown during installation | ||
| + | Message = Bitte warten, das Produkt wird installiert | ||
| + | ;Loglevel einstellen / set loglevel | ||
| + | setLogLevel = 6 | ||
| + | ;Bei Fehlern abbrechen / Exit on errors | ||
| + | ExitOnError = false | ||
| + | ;Syntax Fehler werden | ||
| + | ScriptErrorMessages = on | ||
| + | ; | ||
| + | TraceMode = off | ||
| + | ;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen / Don't show the winst-window in foreground during batchmode | ||
| + | StayOnTop = false | ||
| + | |||
| [Actions] | [Actions] | ||
| - | DosInAnIcon_import | + | ;Variable für die Ermittlung des Betriebssystems / What kind of OS do we have? |
| + | DefVar $OS$ | ||
| + | Set $OS$ = GetOS | ||
| + | ;Variable für die Ermittlung der Betriebssystem Unterversion / What kind of subversion? | ||
| + | DefVar $NTVersion$ | ||
| + | Set $NTVersion$ = GetNTVersion | ||
| + | ;Die Variable zur Auswertung des ExitCodes | ||
| + | DefVar $ExitCode$ | ||
| + | ;Name des Produkts (max. 12 Zeichen) / Name of product (max 12 characters) | ||
| + | DefVar $ProductName$ | ||
| + | Set $ProductName$ = " | ||
| + | ; | ||
| + | DefVar $ProductNameFull1$ | ||
| + | Set $ProductNameFull1$ = " | ||
| + | ;Dateiname des Produktbildes mit Erweiterung / Dilename of productpicture incl. extension | ||
| + | DefVar $ProductPicture$ | ||
| + | Set $ProductPicture$ = " | ||
| + | ;Anzeigen der Installationsbenachrichtigung incl. des vollen Produktnamens / Show installation-message incl. productname | ||
| + | Message " | ||
| - | [DosInAnIcon_Import] | + | ;Prüfen der Winst Version / Check the winst-version |
| - | message | + | requiredWinstVersion >= "4.11" |
| - | "%ProgramFilesDir%\OpenSSL\bin\openssl" | + | |
| - | message | + | ; |
| - | %scriptpath%\CertMgr.exe -add -c "%ProgramFilesDir%\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.der" | + | ShowBitmap /3 "%scriptpath%\" |
| + | |||
| + | ;Freien Speicherplatz ermitteln / Check free space on disk | ||
| + | if not (HasMinimumSpace (" | ||
| + | LogError "Nicht genügend Platz auf %SYSTEMDRIVE%" | ||
| + | isFatalError | ||
| + | endif | ||
| + | |||
| + | ;OS-Version ermitteln / Get the OS-Version | ||
| + | if ( $NTVersion$ = " | ||
| + | Winbatch_Install | ||
| + | sub "%ScriptDrive%\install\check_exitcode\check_innosetup-exitcode.ins" | ||
| + | Files_Copy | ||
| + | Linkfolder_Custom | ||
| + | else | ||
| + | LogError "Kein kompatibles Betriebssystem installiert" | ||
| + | isFatalError | ||
| + | endif | ||
| + | |||
| + | |||
| + | [Winbatch_Install] | ||
| + | " | ||
| + | |||
| + | |||
| + | [Linkfolder_Custom] | ||
| + | ;Startmenü anpassen | ||
| + | Set_basefolder common_programs | ||
| + | delete_subfolder | ||
| + | Set_link | ||
| + | name: $ProductName$ | ||
| + | target: | ||
| + | parameters: | ||
| + | working_dir: | ||
| + | icon_file: | ||
| + | icon_index: | ||
| + | end_link | ||
| + | Set_link | ||
| + | name: " | ||
| + | target: %ProgramFiles32Dir%\WinSCP\PuTTY\pageant.exe | ||
| + | parameters: | ||
| + | working_dir: | ||
| + | icon_file: | ||
| + | icon_index: | ||
| + | end_link | ||
| + | Set_link | ||
| + | name: | ||
| + | target: | ||
| + | parameters: | ||
| + | working_dir: | ||
| + | icon_file: | ||
| + | icon_index: | ||
| + | end_link | ||
| + | |||
| + | |||
| + | [Files_Copy] | ||
| + | copy "%SCRIPTPATH%\WinSCP.ini" " | ||
| + | </ | ||
| + | |||
| + | ==== Uninstall.ins ==== | ||
| + | |||
| + | <code winst> | ||
| + | |||
| + | [Initial] | ||
| + | |||
| + | ;Standard Text, der während der Deinstallation angezeigt wird | ||
| + | Message = Bitte warten, das Produkt wird deinstalliert | ||
| + | ;Loglevel einstellen | ||
| + | setLogLevel = 6 | ||
| + | ;Bei Fehlern abbrechen | ||
| + | ExitOnError = false | ||
| + | ;Syntax Fehler werden in einem separaten Fenster angezeigt | ||
| + | ScriptErrorMessages = on | ||
| + | ;Single-Step Mode nicht verwenden | ||
| + | TraceMode = off | ||
| + | ;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen | ||
| + | StayOnTop = false | ||
| + | |||
| + | [Actions] | ||
| + | ;Name des Produkts (max. 12 Zeichen) | ||
| + | DefVar $ProductName$ | ||
| + | Set $ProductName$ = " | ||
| + | ; | ||
| + | DefVar $ProductNameFull1$ | ||
| + | set $ProductNameFull1$ = " | ||
| + | ;Dateiname des Produktbildes mit Erweiterung | ||
| + | DefVar $ProductPicture$ | ||
| + | Set $ProductPicture$ = " | ||
| + | ;Die Variable zur Auswertung des ExitCodes | ||
| + | DefVar $ExitCode$ | ||
| + | ;Anzeigen der Deinstallationsbenachrichtigung incl. des vollen Produktnamens | ||
| + | Message " | ||
| + | ; | ||
| + | ShowBitmap /3 " | ||
| + | Winbatch_Uninstall | ||
| + | sub " | ||
| + | Linkfolder_Custom | ||
| + | [Winbatch_Uninstall] | ||
| + | " | ||
| + | [Linkfolder_Custom] | ||
| + | ;Startmenü Verknüpfung löschen | ||
| + | Set_basefolder common_programs | ||
| + | Set_subfolder "" | ||
| + | delete_element " | ||
| + | delete_element " | ||
| + | delete_element " | ||
| </ | </ | ||