This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
userspace:winscp [2011/11/22 08:53] Thomas_H |
userspace:winscp [2012/06/19 10:57] tobias |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ======ImportCert====== |
- | Script by Der-Matze | + | Script by tobias |
Comments and improvements welcome \\ | Comments and improvements welcome \\ | ||
- | Tested with opsi 4.0.1 \\ | + | Tested with opsi 4.0.2 \\ |
- | Tested with opsi-winst | + | Tested with opsi-winst 4.11.2.5 \\ |
- | Tested with Windows XP Professional and Windows 7 Enterprise | + | Tested with Windows 7 Enterprise |
- | Installation / Uninstallation | + | Import des opsiclientd Zertifikats |
+ | Das Script | ||
+ | Nach diesem Vorgang wird keine Zertifikatswarnung mehr angezeigt. | ||
+ | Damit dies Script funktioniert, | ||
- | This script uses the check_innosetup-exitcode script: https:// | + | Achtung: Firefox verwendet nicht den Windows Zertifikatsspeicher ! |
- | The installation file can be downloaded from: http:// | + | ==== import.ins ==== |
- | + | ||
- | + | ||
- | + | ||
- | ==== 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] | ||
- | ;Variable für die Ermittlung des Betriebssystems / What kind of OS do we have? | + | DosInAnIcon_import |
- | 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 " | ||
- | ;Prüfen der Winst Version / Check the winst-version | + | [DosInAnIcon_Import] |
- | requiredWinstVersion >= "4.11" | + | message |
- | + | "%ProgramFilesDir%\OpenSSL\bin\openssl" | |
- | ; | + | message |
- | ShowBitmap /3 "%scriptpath%\" | + | %scriptpath%\CertMgr.exe -add -c "%ProgramFilesDir%\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.der" |
- | + | ||
- | ;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 " | ||
</ | </ |