User Tools

Site Tools


userspace:winscp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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:
-====== WinSCP 4.3.5 ====== +======ImportCert====== 
-Script by Der-Matze \\+Script by tobias \\
 Comments and improvements welcome \\ Comments and improvements welcome \\
  
-Tested with opsi 4.0.\\ +Tested with opsi 4.0.\\ 
-Tested with opsi-winst 4.10.x - 4.11.1.\\ +Tested with opsi-winst 4.11.2.\\ 
-Tested with Windows XP Professional and Windows 7 Enterprise x64 \\+Tested with Windows 7 Enterprise x86 \\
  
-Installation / Uninstallation Script for WinSCP \\+Import des opsiclientd Zertifikats 
 +Das Script wandelt das PEM Zertifikat in ein DER Zertifikat um damit es in den Windows Zertifikatsspeicher Importiert werden kann. 
 +Nach diesem Vorgang wird keine Zertifikatswarnung mehr angezeigt.  
 +Damit dies Script funktioniert, wird die "CertMgr.Exe" benötigt die sich im Windows SDK befindet. 
  
-This script uses the check_innosetup-exitcode scripthttps://forum.opsi.org/wiki/userspace:check_innosetup-exitcode \\+AchtungFirefox verwendet nicht den Windows Zertifikatsspeicher ! 
  
-The installation file can be downloaded from: http://winscp.net/eng/download.php \\ +==== import.ins ====
- +
- +
- +
-==== Install.ins ====+
  
 <code winst> <code winst>
  
-[Initial+[initial
- +message "Importiere Zertifikat in den Lokalen Zertifikatsspeicher"
-;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 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] [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$ = "WinSCP" +
- +
- +
- +
-;Vollständiger Produktname incl. Versionsnummer +
- DefVar $ProductNameFull1$ +
- Set $ProductNameFull1$ = "WinSCP 4.3.5" +
- +
- +
- +
-;Dateiname des Produktbildes mit Erweiterung +
- DefVar $ProductPicture$ +
- Set $ProductPicture$ = "WinSCP.png" +
- +
- +
- +
-;Anzeigen der Installationsbenachrichtigung incl. des vollen Produktnamens +
- Message "Installiere "+$ProductNameFull1$ +
- +
- +
- +
-;Prüfen der Winst Version +
- requiredWinstVersion >= "4.11" +
- +
- +
- +
-;$ProductPicture$ und $ProductName$ anzeigen +
- ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ +
- +
- +
- +
-;Freien Speicherplatz ermitteln +
- if not (HasMinimumSpace ("%SYSTEMDRIVE%", "500 MB")) +
- LogError "Nicht genügend Platz auf %SYSTEMDRIVE%" +
- isFatalError +
- endif +
- +
- +
- +
-;OS-Version ermitteln +
- if ( $NTVersion$ = "Win2K" OR $NTVersion$ = "WinXP" OR $NTVersion$ = "Win NT 5.2" OR $NTVersion$ = "Windows Vista" ) +
- +
- +
- +
- 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] +
- +
- "%SCRIPTPATH%\winscp435setup.exe" /VERYSILENT /NOCANDY +
- +
- +
- +
-[Linkfolder_Custom] +
- +
-;Startmenü anpassen +
- Set_basefolder common_programs +
- delete_subfolder "$ProductName$" +
- Set_link +
- name: $ProductName$ +
- target: %ProgramFiles32Dir%\WinSCP\WinSCP.exe +
- parameters: +
- working_dir: +
- icon_file: +
- icon_index: +
- end_link +
- +
- Set_link +
- name: "Pageant" +
- target: %ProgramFiles32Dir%\WinSCP\PuTTY\pageant.exe +
- parameters: +
- working_dir: +
- icon_file: +
- icon_index: +
- end_link +
- +
- Set_link +
- name: "PuTTYGen" +
- target: %ProgramFiles32Dir%\WinSCP\PuTTY\puttygen.exe +
- parameters: +
- working_dir: +
- icon_file: +
- icon_index: +
- end_link +
- +
- +
- +
-[Files_Copy] +
- +
- copy "%SCRIPTPATH%\WinSCP.ini" "%ProgramFiles32Dir%\WinSCP\" +
- +
-</code> +
- +
-==== 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$ = "WinSCP" +
- +
- +
- +
-;Vollständiger Produktname incl. Versionsnummer +
- DefVar $ProductNameFull1$ +
- set $ProductNameFull1$ = "WinSCP 4.3.5" +
- +
- +
- +
-;Dateiname des Produktbildes mit Erweiterung +
- DefVar $ProductPicture$ +
- Set $ProductPicture$ = "WinSCP.png" +
- +
- +
- +
-;Die Variable zur Auswertung des ExitCodes +
- DefVar $ExitCode$ +
- +
- +
- +
-;Anzeigen der Deinstallationsbenachrichtigung incl. des vollen Produktnamens +
- Message "Deinstalliere "+$ProductNameFull1$ +
- +
- +
- +
-;$ProductPicture$ und $ProductName$ anzeigen +
- ShowBitmap /3 "%scriptpath%\" + $ProductPicture$ $ProductName$ +
- +
- +
- +
-Winbatch_Uninstall +
- sub "%ScriptDrive%\install\check_exitcode\check_innosetup-exitcode.ins" +
- +
-Linkfolder_Custom +
- +
- +
- +
- +
- +
-[Winbatch_Uninstall] +
- +
- "%ProgramFiles32Dir%\WinSCP\unins000.exe" /VERYSILENT /NORESTART+
  
  
 +[DosInAnIcon_Import]
 +message "Wandle Zertifikat in der um"
 +"%ProgramFilesDir%\OpenSSL\bin\openssl" x509 -outform der -in "%ProgramFilesDir%\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.pem" -out "%ProgramFilesDir%\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.der"
 +message "Importiere Zertifikat in den Trusted Store"
 +%scriptpath%\CertMgr.exe -add -c "%ProgramFilesDir%\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.der" -s -r localMachine AuthRoot
  
-[Linkfolder_Custom] 
  
-;Startmenü Verknüpfung löschen 
- Set_basefolder common_programs 
- Set_subfolder "" 
- delete_element "$ProductName$" 
- delete_element "Pageant" 
- delete_element "PuTTYGen" 
  
 </code> </code>
userspace/winscp.txt · Last modified: 2021/08/23 08:37 (external edit)