This shows you the differences between two versions of the page.
userspace:etu_adobe_reader [2015/04/03 10:05] Robert Tauber [uninstall.ins] |
userspace:etu_adobe_reader [2021/08/23 08:37] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== ETU Adobe Reader ====== | ||
- | |||
- | **Versions**\\ | ||
- | Versions | ||
- | By // | ||
- | |||
- | |||
- | Tested with opsi xxxxx\\ | ||
- | requiredWinstVersion >= 4.11.4.12 // | ||
- | |||
- | Das Setup-File wird unter Q:\Adobe Reader\Adobe Reader\AdbeRdr##### | ||
- | |||
- | Tree (..\opt_pcbin\install\!drivemap): | ||
- | [[map_Q.exe]]\\ | ||
- | |||
- | Tree (Q:\Adobe Reader):\\ | ||
- | Copy.exe\\ | ||
- | Adobe Reader\AdbeRdr##### | ||
- | |||
- | Tree (..\Adobe Reader):\\ | ||
- | OPSI\control\\ | ||
- | CLIENT_DATA\setup.ins\\ | ||
- | CLIENT_DATA\uninstall.ins\\ | ||
- | CLIENT_DATA\image.png\\ | ||
- | |||
- | ==== control ==== | ||
- | < | ||
- | [Package] | ||
- | version: 2014.12.08 | ||
- | depends: | ||
- | incremental: | ||
- | |||
- | [Product] | ||
- | type: localboot | ||
- | id: adobe-reader | ||
- | name: Adobe Reader | ||
- | description: | ||
- | advice: packed by Robert Tauber | ||
- | version: 0 | ||
- | priority: 0 | ||
- | licenseRequired: | ||
- | productClasses: | ||
- | setupScript: | ||
- | uninstallScript: | ||
- | updateScript: | ||
- | alwaysScript: | ||
- | onceScript: | ||
- | customScript: | ||
- | userLoginScript: | ||
- | |||
- | [ProductDependency] | ||
- | action: setup | ||
- | requiredProduct: | ||
- | requiredAction: | ||
- | requirementType: | ||
- | |||
- | [ProductDependency] | ||
- | action: uninstall | ||
- | requiredProduct: | ||
- | requiredAction: | ||
- | requirementType: | ||
- | </ | ||
- | |||
- | ==== Copy.exe / Copy.au3 ==== | ||
- | Kopieren und Umbenennen \\ | ||
- | //Später ermitteln der Version Nummer// | ||
- | |||
- | <code autoit> | ||
- | #include < | ||
- | #include < | ||
- | |||
- | Local $sPath = @ScriptDir | ||
- | Local $aPath = StringSplit( @ScriptDir, " | ||
- | Local $sPathTo = " | ||
- | local $extention = " | ||
- | |||
- | |||
- | ; | ||
- | |||
- | ;MsgBox ( 1, "Zeil Pfad", $sPathTo | ||
- | DirRemove ( $sPathTo , 1 ) | ||
- | |||
- | Local $sFolderList = _FileListToArray($sPath , " | ||
- | local $i = 0 | ||
- | For $i = 1 to $sFolderList[0] | ||
- | |||
- | Local $sFileList = _FileListToArray($sPath & " | ||
- | if $sFileList <> 0 Then | ||
- | if $sFileList[0] = 1 Then | ||
- | ; | ||
- | $sFrom = $sPath & " | ||
- | $sTo = $sPathTo & " | ||
- | FileCopy ( $sFrom, $sTo, 9 ) | ||
- | ;DirRemove ( $sFrom ,1 ) | ||
- | ;MsgBox ( 1, " | ||
- | Else | ||
- | MsgBox ( 1, " | ||
- | _ArrayDisplay($sFileList, | ||
- | EndIf | ||
- | Else | ||
- | ;MsgBox ( 1, "No Subfolders in: ", $sPath & " | ||
- | endif | ||
- | Next | ||
- | |||
- | Exit | ||
- | </ | ||
- | |||
- | ==== setup.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/ | ||
- | ; | ||
- | DosInAnIcon_Q | ||
- | DosInAnIcon_Copy | ||
- | |||
- | |||
- | |||
- | |||
- | ; | ||
- | ; Die Installation | ||
- | ; | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | ; | ||
- | |||
- | ; | ||
- | ; Subroutinen | ||
- | ; | ||
- | [FilesCleanDir] | ||
- | Delete -s $LocalDir$ | ||
- | |||
- | [DosBatchMakeDir] | ||
- | @echo off | ||
- | mkdir $LocalDir$ | ||
- | |||
- | [WinbatchInstallation] | ||
- | " | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | ; | ||
- | ; 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> | ||
- | ; 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/ | ||
- | ; | ||
- | DosInAnIcon_Q | ||
- | DosInAnIcon_Copy | ||
- | |||
- | |||
- | |||
- | |||
- | ; | ||
- | ; Die DeInstallation | ||
- | ; | ||
- | Set $Part$ = " | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | ; | ||
- | |||
- | ; | ||
- | ; Subroutinen | ||
- | ; | ||
- | [FilesCleanDir] | ||
- | Delete -s $LocalDir$ | ||
- | |||
- | [DosBatchMakeDir] | ||
- | @echo off | ||
- | mkdir $LocalDir$ | ||
- | |||
- | [DosBatchUnInstallation] | ||
- | @echo off | ||
- | MsiExec.exe /qn /X {AC76BA86-7AD7-1031-7B44-AB0000000001} | ||
- | |||
- | |||
- | |||
- | |||
- | ; | ||
- | ; 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 | ||
- | </ | ||
- | |||
- | ==== notepad++.exe / notepad++.au3 ==== | ||
- | <code autoit> | ||
- | #include < | ||
- | |||
- | ;=== Befehle aufbereiten === | ||
- | ;RT 2015.03.13: | ||
- | ; Ziel ist es die aufruf parameter korekt weiter zu geben | ||
- | $pfad = @ScriptDir | ||
- | $name = " | ||
- | $cmp = _ArrayToString($CmdLine, | ||
- | $prog = '"' | ||
- | ;RT 2015.03.13: Zur kontrolle | ||
- | ; | ||
- | |||
- | |||
- | ;=== Zusatz Aktionen === | ||
- | ;RT 2015.03.13: | ||
- | ; Was Soll Pasiren befor das Programm aufgerufen wird | ||
- | ; == Kopiren == | ||
- | ;RT 2015.03.13: Quelle und Ziel definiren | ||
- | $file = " | ||
- | $quelle = @ScriptDir & " | ||
- | $ziel = @AppDataDir & " | ||
- | |||
- | ;RT 2015.03.13: Prüfen ob Quelle ok und Ziel nochnicht vorhanden | ||
- | if FileExists($quelle) and not FileExists($ziel) then | ||
- | ;RT 2015.03.13: Zur kontrolle | ||
- | ; | ||
- | | ||
- | EndIf | ||
- | |||
- | run ($prog) | ||
- | ;RT 2015.03.13: Zur kontrolle | ||
- | ; | ||
- | |||
- | </ | ||