This shows you the differences between two versions of the page.
userspace:etu_notepad [2015/03/28 23:28] Robert Tauber [setup.ins] |
userspace:etu_notepad [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ETU Notepad++ ====== | ||
- | **Versions**\\ | ||
- | Versions | ||
- | By // | ||
- | |||
- | |||
- | Tested with opsi xxxxx\\ | ||
- | Tested with opsi xxxxx | ||
- | requiredWinstVersion >= 4.10.5 // | ||
- | |||
- | Das Setup-File wird unter Q: | ||
- | |||
- | Tree (..\notepadpp): | ||
- | OPSI\control\\ | ||
- | CLIENT_DATA\setup.ins\\ | ||
- | CLIENT_DATA\uninstall.ins\\ | ||
- | CLIENT_DATA\image.png\\ | ||
- | |||
- | um eine userDefinedLang vorzuinstalliren z.B. Syntax Highlighting für winst\\ | ||
- | CLIENT_DATA\userDefineLang\notepad++.exe\\ | ||
- | CLIENT_DATA\userDefineLang\userDefineLang.xml\\ | ||
- | |||
- | ==== setup.ins ==== | ||
- | <code winst> | ||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | setLogLevel = 5 | ||
- | StayOnTop = on | ||
- | DefVar $ProductId$ | ||
- | DefVar $ProductNameShort$ | ||
- | DefVar $ProductNameLong$ | ||
- | DefVar $LocalDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $Part$ | ||
- | DefVar $ValidOS$ | ||
- | Set $ValidOS$ = " | ||
- | |||
- | ; | ||
- | ; Angaben zum Produkt | ||
- | ; | ||
- | ; Kurzer Produktname (max. 12 Zeichen) | ||
- | Set $ProductNameShort$ = " | ||
- | ; Langer Produktname (max. 30 Zeichen) | ||
- | Set $ProductNameLong$ = " | ||
- | ; | ||
- | ; Gewünschtes Betriebssystem (alle ungültigen auskommentieren) | ||
- | ; subCheckForWinXP-32 ; Windows XP 32-bit | ||
- | ; subCheckForVista-32 ; Windows Vista 32-bit | ||
- | ; subCheckForVista-64 ; Windows Vista 64-bit | ||
- | ; subCheckForSeven-32 ; Windows 7 32-bit | ||
- | | ||
- | ; | ||
- | |||
- | |||
- | |||
- | |||
- | ; | ||
- | ; Muss normalerweise nicht geändert werden | ||
- | ; | ||
- | |||
- | ; Bildchen und Statusmeldung | ||
- | ShowBitmap " | ||
- | Message " | ||
- | |||
- | ; Lokalen Pfad erzeugen | ||
- | Set $ProductId$ | ||
- | if $ProductId$ = "" | ||
- | Set $ProductId$ | ||
- | endif | ||
- | Set $LocalDir$ = " | ||
- | |||
- | ; Prüfen, ob gültiges Betriebssystem | ||
- | if $ValidOS$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | |||
- | ; | ||
- | ; Daten vorbereiten | ||
- | ; | ||
- | | ||
- | | ||
- | |||
- | ; | ||
- | ; Netzlaufwerk verbinden/ | ||
- | ; | ||
- | DosInAnIcon_Q | ||
- | DosInAnIcon_Copy | ||
- | |||
- | ; | ||
- | ; Die DeInstallation | ||
- | ; | ||
- | Set $Part$ = " | ||
- | if FileExists(" | ||
- | Winbatch_uninstall | ||
- | subCheckExitCodeVLC | ||
- | Files_uninstall | ||
- | endif | ||
- | |||
- | ; | ||
- | ; Die Installation | ||
- | ; | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | ; | ||
- | |||
- | ; | ||
- | ; Subroutinen | ||
- | ; | ||
- | [FilesCleanDir] | ||
- | Delete -s $LocalDir$ | ||
- | |||
- | [DosBatchMakeDir] | ||
- | @echo off | ||
- | mkdir $LocalDir$ | ||
- | |||
- | [WinbatchInstallation] | ||
- | " | ||
- | |||
- | ;RT 2015.03.13: | ||
- | ; Da npp derzeit nicht dazu in der lage sit ein Globales userDefineLang.xml allen usern zur verfügung zu stellen | ||
- | ; z.B.: das Syntax Highlighting für winst dint das als workaround | ||
- | ; dabei kommt ein auto it skript zum einsatz das sich als Notepad++.exe ausgibt zum einsatz | ||
- | ; dise fängt den Befehl ab, Kopirt wenn noch nicht vorhanden die userDefineLang.xml nach %appdata%\Notepad++ | ||
- | ; und startet dan die umbenante Notepad+++.exe mit den ursprünglichen komandos. | ||
- | [DosBatch_Setings] | ||
- | ren " | ||
- | COPY " | ||
- | |||
- | |||
- | |||
- | [Winbatch_uninstall] | ||
- | " | ||
- | |||
- | [Files_uninstall] | ||
- | delete -sf " | ||
- | |||
- | ; | ||
- | ; Netzlaufwerk verbinden/ | ||
- | ; | ||
- | [DosInAnIcon_Q] | ||
- | " | ||
- | [DosInAnIcon_Copy] | ||
- | " | ||
- | [FilesCleanTemp] | ||
- | Delete -s " | ||
- | |||
- | |||
- | ; | ||
- | ; Subroutinen zur Überprüfung der ExitCodes | ||
- | ; Je nach Installer verschieden | ||
- | ; | ||
- | ; | ||
- | ; Windows Installer: subCheckExitCodeMSI | ||
- | ; 0 = Erfolgreich | ||
- | ; 3010 = Bitte Neustart | ||
- | |||
- | ; Diverse EXE-Dateien: | ||
- | ; 0 = Erfolgreich | ||
- | |||
- | ; | ||
- | |||
- | [subCheckExitCodeMSI] | ||
- | Set $ExitCode$ = getLastExitCode | ||
- | ; Abbruch bei Fehler | ||
- | if not (($ExitCode$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | comment " | ||
- | ; Neustart, falls gewünscht | ||
- | if $ExitCode$ = " | ||
- | set $Reboot$ = " | ||
- | endif | ||
- | |||
- | [subCheckExitCodeEXE] | ||
- | Set $ExitCode$ = getLastExitCode | ||
- | ; Abbruch bei Fehler | ||
- | if not ($ExitCode$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | comment " | ||
- | |||
- | |||
- | [subReboot] | ||
- | if $Reboot$ = " | ||
- | ExitWindows /Reboot | ||
- | endif | ||
- | |||
- | |||
- | |||
- | ; | ||
- | ; Subroutinen zur Überprüfung der Windows-Version | ||
- | ; | ||
- | [subCheckForWinXP-32] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | [subCheckForVista-32] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | [subCheckForVista-64] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | [subCheckForSeven-32] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | [subCheckForSeven-64] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | </ | ||
- | |||
- | ==== uninstall.ins ==== | ||
- | <code winst> | ||
- | ; (c) Robert Tauber 2014 | ||
- | |||
- | [Actions] | ||
- | requiredWinstVersion >= " | ||
- | setLogLevel = 5 | ||
- | StayOnTop = on | ||
- | DefVar $ProductId$ | ||
- | DefVar $ProductNameShort$ | ||
- | DefVar $ProductNameLong$ | ||
- | DefVar $LocalDir$ | ||
- | DefVar $ExitCode$ | ||
- | DefVar $Part$ | ||
- | DefVar $ValidOS$ | ||
- | Set $ValidOS$ = " | ||
- | |||
- | ; | ||
- | ; Angaben zum Produkt | ||
- | ; | ||
- | ; Kurzer Produktname (max. 12 Zeichen) | ||
- | Set $ProductNameShort$ = "Adobe Reader" | ||
- | ; Langer Produktname (max. 30 Zeichen) | ||
- | Set $ProductNameLong$ = "Adobe Reader" | ||
- | ; | ||
- | ; Gewünschtes Betriebssystem (alle ungültigen auskommentieren) | ||
- | ; subCheckForWinXP-32 ; Windows XP 32-bit | ||
- | ; subCheckForVista-32 ; Windows Vista 32-bit | ||
- | ; subCheckForVista-64 ; Windows Vista 64-bit | ||
- | ; subCheckForSeven-32 ; Windows 7 32-bit | ||
- | | ||
- | ; | ||
- | |||
- | |||
- | |||
- | |||
- | ; | ||
- | ; Muss normalerweise nicht geändert werden | ||
- | ; | ||
- | |||
- | ; Bildchen und Statusmeldung | ||
- | ShowBitmap " | ||
- | Message " | ||
- | |||
- | ; Lokalen Pfad erzeugen | ||
- | Set $ProductId$ | ||
- | if $ProductId$ = "" | ||
- | Set $ProductId$ | ||
- | endif | ||
- | Set $LocalDir$ = " | ||
- | |||
- | ; Prüfen, ob gültiges Betriebssystem | ||
- | if $ValidOS$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | |||
- | ; | ||
- | ; Daten vorbereiten | ||
- | ; | ||
- | | ||
- | | ||
- | |||
- | ; | ||
- | ; Netzlaufwerk verbinden/ | ||
- | ; | ||
- | ; | ||
- | ; | ||
- | |||
- | |||
- | |||
- | |||
- | ; | ||
- | ; Die DeInstallation | ||
- | ; | ||
- | Set $Part$ = " | ||
- | if FileExists(" | ||
- | Winbatch_uninstall | ||
- | subCheckExitCodeVLC | ||
- | Files_uninstall | ||
- | endif | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | ; | ||
- | |||
- | ; | ||
- | ; Subroutinen | ||
- | ; | ||
- | [FilesCleanDir] | ||
- | Delete -s $LocalDir$ | ||
- | |||
- | [DosBatchMakeDir] | ||
- | @echo off | ||
- | mkdir $LocalDir$ | ||
- | |||
- | [Winbatch_uninstall] | ||
- | " | ||
- | |||
- | [Files_uninstall] | ||
- | delete -sf " | ||
- | |||
- | |||
- | ; | ||
- | ; Netzlaufwerk verbinden/ | ||
- | ; | ||
- | [DosInAnIcon_Q] | ||
- | " | ||
- | [DosInAnIcon_Copy] | ||
- | " | ||
- | [FilesCleanTemp] | ||
- | Delete -s " | ||
- | |||
- | |||
- | ; | ||
- | ; Subroutinen zur Überprüfung der ExitCodes | ||
- | ; Je nach Installer verschieden | ||
- | ; | ||
- | ; | ||
- | ; Windows Installer: subCheckExitCodeMSI | ||
- | ; 0 = Erfolgreich | ||
- | ; 3010 = Bitte Neustart | ||
- | |||
- | ; Diverse EXE-Dateien: | ||
- | ; 0 = Erfolgreich | ||
- | |||
- | ; | ||
- | |||
- | [subCheckExitCodeMSI] | ||
- | Set $ExitCode$ = getLastExitCode | ||
- | ; Abbruch bei Fehler | ||
- | if not (($ExitCode$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | comment " | ||
- | ; Neustart, falls gewünscht | ||
- | if $ExitCode$ = " | ||
- | set $Reboot$ = " | ||
- | endif | ||
- | |||
- | [subCheckExitCodeEXE] | ||
- | Set $ExitCode$ = getLastExitCode | ||
- | ; Abbruch bei Fehler | ||
- | if not ($ExitCode$ = " | ||
- | LogError " | ||
- | isFatalError | ||
- | endif | ||
- | comment " | ||
- | |||
- | [subReboot] | ||
- | if $Reboot$ = " | ||
- | ExitWindows /Reboot | ||
- | endif | ||
- | |||
- | |||
- | |||
- | ; | ||
- | ; Subroutinen zur Überprüfung der Windows-Version | ||
- | ; | ||
- | [subCheckForWinXP-32] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | [subCheckForVista-32] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | [subCheckForVista-64] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | [subCheckForSeven-32] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | [subCheckForSeven-64] | ||
- | if GetMsVersionInfo = " | ||
- | Set $ValidOS$ = " | ||
- | endif | ||
- | |||
- | </ | ||
- | |||
- | ==== setup.ins ==== | ||
- | <code winst> | ||
- | </ |