This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
userspace:winscp [2011/10/10 14:02] Der-Matze created |
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 | + | |
- | Message = Bitte warten, das Produkt wird installiert | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Loglevel einstellen | + | |
- | setLogLevel = 6 | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Bei Fehlern abbrechen | + | |
- | ExitOnError = false | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Syntax Fehler werden | + | |
- | ScriptErrorMessages = on | + | |
- | + | ||
- | + | ||
- | + | ||
- | ; | + | |
- | TraceMode = off | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Im Batchmode das Winst-Fenster nicht im Vordergrund anzeigen | + | |
- | StayOnTop = false | + | |
- | + | ||
- | + | ||
- | + | ||
[Actions] | [Actions] | ||
- | + | DosInAnIcon_import | |
- | ;Variable für die Ermittlung des Betriebssystems | + | |
- | DefVar $OS$ | + | |
- | Set $OS$ = GetOS | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Variable für die Ermittlung der Betriebssystem Unterversion | + | |
- | DefVar $NTVersion$ | + | |
- | Set $NTVersion$ = GetNTVersion | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Die Variable zur Auswertung des ExitCodes | + | |
- | DefVar $ExitCode$ | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Name des Produkts (max. 12 Zeichen) | + | |
- | DefVar $ProductName$ | + | |
- | Set $ProductName$ = " | + | |
- | + | ||
- | + | ||
- | + | ||
- | ; | + | |
- | DefVar $ProductNameFull1$ | + | |
- | Set $ProductNameFull1$ = " | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Dateiname des Produktbildes mit Erweiterung | + | |
- | DefVar $ProductPicture$ | + | |
- | Set $ProductPicture$ = " | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Anzeigen der Installationsbenachrichtigung incl. des vollen Produktnamens | + | |
- | Message " | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Prüfen der Winst Version | + | |
- | requiredWinstVersion >= " | + | |
- | + | ||
- | + | ||
- | + | ||
- | ; | + | |
- | ShowBitmap /3 " | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;Freien Speicherplatz ermitteln | + | |
- | if not (HasMinimumSpace (" | + | |
- | LogError "Nicht genügend Platz auf %SYSTEMDRIVE%" | + | |
- | isFatalError | + | |
- | endif | + | |
- | + | ||
- | + | ||
- | + | ||
- | ;OS-Version ermitteln | + | |
- | if ( $NTVersion$ = " | + | |
- | + | ||
- | + | ||
- | + | ||
- | Winbatch_Install | + | |
- | sub " | + | |
- | + | ||
- | 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: %ProgramFiles32Dir%\WinSCP\WinSCP.exe | + | |
- | 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: %ProgramFiles32Dir%\WinSCP\PuTTY\puttygen.exe | + | |
- | parameters: | + | |
- | working_dir: | + | |
- | icon_file: | + | |
- | icon_index: | + | |
- | end_link | + | |
- | + | ||
- | + | ||
- | + | ||
- | [Files_Copy] | + | |
- | + | ||
- | copy " | + | |
- | + | ||
- | </ | + | |
- | + | ||
- | ==== 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 | + | |
- | + | ||
- | + | ||
- | + | ||
- | ; | + | |
- | 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] | + | |
- | + | ||
- | " | + | |
+ | [DosInAnIcon_Import] | ||
+ | message " | ||
+ | " | ||
+ | message " | ||
+ | %scriptpath%\CertMgr.exe -add -c " | ||
- | [Linkfolder_Custom] | ||
- | ;Startmenü Verknüpfung löschen | ||
- | Set_basefolder common_programs | ||
- | Set_subfolder "" | ||
- | delete_element " | ||
- | delete_element " | ||
- | delete_element " | ||
</ | </ |