PDF24 angepasste Installation (nur PDF Druckertreiber) per Script

Deine Frage passt nicht in die anderen Bereiche, dann stelle sie hier.
Antworten
Benutzeravatar
Holgi
Elite
Elite
Beiträge: 2113
Registriert: 12.05.2018, 12:33
Hat sich bedankt: 207 Mal
Danke erhalten: 273 Mal
Gender:

PDF24 angepasste Installation (nur PDF Druckertreiber) per Script

Beitrag von Holgi » 11.05.2023, 20:41

ich hatte in der Vergangenheit schon mal mit dem PDFCreator herumgespielt:
viewtopic.php?t=23118

Nunmehr geht es hier um das Programm PDF24; https://www.pdf24.org/de/
Dieses war früher mal recht handlich; hat jetzt aber durch die Integration von WebView2 eine Installationsgröße von gut 700MB, wovon WebView ungefähr die Hälfte in Anspruch nimmt.

Wer nur den PDF Druckertreiber daraus benötigt, verschwendet also ganz schön Ressourcen.
Also habe ich mal ein kleines Script geschrieben, um lediglich den Druckertreiber zu installieren.
Die aktuelle Version von PDF24 wird heruntergeladen, entpackt, unnötige Dateien gelöscht und dann der Druckertreiber installiert bzw. wenn gewünscht auch das ganze Programmpaket (ohne Sprachdateien mit Ausnahme von Deutsch).
Mann muss lediglich das Script starten, einen Installationsordner auswählen ("S" für den Standardordner "Downloads") und nach einer Weile noch entscheiden, ob nur der Druckertreiber "D" oder das ganze Paket mit Weboberfläche "W" installiert werden soll.
hier das Script. Abspeichern zum Beispiel als PDF24 Download_extract_shrink_copy.cmd

Code: Alles auswählen

@echo off
COLOR 0a
REM Color 1f
REM 1 Dunkelblau 9 Blau    2 Dunkelgrün  A Grün  3 Blaugrün 	B Zyan 0 Schwarz 	8 Dunkelgrau 4 	Dunkelrot 	C Rot 
REM 5 Lila 	D Magenta 6 Ocker E Gelb 7 Hellgrau 	F Weiß 
REM 1. Wert Hintergrund    2. Wert Textfarbe
REM
cls
chcp 1252 >nul

:Admin
cls

:: BatchGotAdmin
:-------------------------------------
REM  --> Check for permissions
    IF "%PROCESSOR_ARCHITECTURE%" EQU "amd64" (
>nul 2>&1 "%SYSTEMROOT%\SysWOW64\cacls.exe" "%SYSTEMROOT%\SysWOW64\config\system"
) ELSE (
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
)

REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
    echo Requesting administrative privileges...
    goto UACPrompt
) else ( goto gotAdmin )

:UACPrompt
    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
    set params= %*
    echo UAC.ShellExecute "cmd.exe", "/c ""%~s0"" %params:"=""%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"
    del "%temp%\getadmin.vbs"

    exit /B

:gotAdmin
    pushd "%CD%"
    CD /D "%~dp0"

taskkill /im pdf24.exe /f 1>nul 2>nul

net stop "PDF24" 1>nul 2>nul
reg delete HKLM\SOFTWARE\PDF24 /f 1>nul 2>nul
reg delete HKCU\SOFTWARE\PDF24 /f 1>nul 2>nul

:eingabe
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo 		PDF24 wird standardmäßig im DownloadOrdner des aktuellen Benutzers gespeichert
Echo.
Echo 	    Es kann aber auch ein individuelles Unterverzeichnis vorgegeben werden, welches nicht vorhanden sein muss
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo.
echo ------------------------------------------------------------------------------------------------------------------------
echo 				für das Standardverzeichnis wählen Sie bitte "S"
echo 			    für das Verzeichnis in PortableAppz wählen Sie bitte "P"
echo 		wenn Sie ein eigenes Unterverzeichnis im DownloadOrdner angeben möchten wählen Sie "I"
echo ------------------------------------------------------------------------------------------------------------------------
@CHOICE /C SPI /M "Drücken Sie S für Standard, P für PortableAppz oder I für Individual."
if errorlevel 3 GOTO Individual
if errorlevel 2 GOTO PortableAppz
if errorlevel 1 GOTO Standard
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo.
:Individual
CLS
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo	               		         bitte hier ggf. das Unterverzeichnis vorgeben 
Echo.
Echo 				           ohne die Anführungszeichen
Echo.
Echo 		             aber mit dem Backslash als OrdnerTrennung und als Abschluss!
Echo.
Echo				               (z.B. "Office\" oder "Office\Test\") 
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Echo Eingabe oder mit Enter-Taste fortfahren:
set /p Ordner=

REG ADD HKLM\SOFTWARE\PDF24 /f /v "InstallDir" /t REG_SZ /d "%USERPROFILE%\Downloads\%Ordner%PDF24"
REG ADD HKLM\SOFTWARE\PDF24 /v "Language" /t REG_SZ /d "German" /f
REG ADD HKCU\SOFTWARE\PDF24 /v "Language" /t REG_SZ /d "German" /f
REG ADD HKLM\SOFTWARE\PDF24 /v "UpdateMode" /t REG_DWORD /d 00000002 /f
REG ADD HKLM\SOFTWARE\PDF24 /v "assistant.openPDFAfterSave" /t REG_DWORD /d 00000001 /f
REG ADD HKLM\SOFTWARE\PDF24 /f /v "assistant.fixedSaveDir" /t REG_SZ /d "%homedrive%\%homepath%\\Documents"
goto showOrdner

:PortableAppz
set Ordner=PortableAppz\PortableApps\
REG ADD HKLM\SOFTWARE\PDF24 /f /v "InstallDir" /t REG_SZ /d "%USERPROFILE%\Downloads\PortableAppz\PortableApps\PDF24"
REG ADD HKLM\SOFTWARE\PDF24 /v "Language" /t REG_SZ /d "German" /f
REG ADD HKCU\SOFTWARE\PDF24 /v "Language" /t REG_SZ /d "German" /f
REG ADD HKLM\SOFTWARE\PDF24 /v "UpdateMode" /t REG_DWORD /d 00000002 /f
REG ADD HKLM\SOFTWARE\PDF24 /v "assistant.openPDFAfterSave" /t REG_DWORD /d 00000001 /f
REG ADD HKLM\SOFTWARE\PDF24 /f /v "assistant.fixedSaveDir" /t REG_SZ /d "%homedrive%\%homepath%\\Documents"
goto showOrdner

:Standard
set Ordner=
REG ADD HKLM\SOFTWARE\PDF24 /f /v "InstallDir" /t REG_SZ /d "%USERPROFILE%\Downloads\PDF24"
REG ADD HKLM\SOFTWARE\PDF24 /v "Language" /t REG_SZ /d "German" /f
REG ADD HKCU\SOFTWARE\PDF24 /v "Language" /t REG_SZ /d "German" /f
REG ADD HKLM\SOFTWARE\PDF24 /v "UpdateMode" /t REG_DWORD /d 00000002 /f
REG ADD HKLM\SOFTWARE\PDF24 /v "assistant.openPDFAfterSave" /t REG_DWORD /d 00000001 /f
REG ADD HKLM\SOFTWARE\PDF24 /f /v "assistant.fixedSaveDir" /t REG_SZ /d "%homedrive%\%homepath%\\Documents"

:showOrdner
cls
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo 					PDF24 wird jetzt hier gespeichert:
echo 				   %homedrive%%homepath%\Downloads\%Ordner%PDF24
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
timeout /T 5 >nul
:Versionsauswahl

if exist "%~dp0pdf24-creator.msi" goto extract
cls
:Download
powershell -noprofile Start-BitsTransfer -Priority 'Foreground' -DisplayName 'PDF24' -Description 'Es wird die aktuelle Version von PDF24 heruntergeladen' -ProxyUsage Autodetect -Source "https://www.pdf24.org/products/pdf-creator/download/pdf24-creator.msi"

if not exist "%~dp0pdf24-creator.msi" goto Fehler
rmdir "%Systemdrive%\PDF24\" /s /q 1>nul 2>nul

goto extract

cls

:extract
rmdir "%Systemdrive%\PDF24\" /s /q 2>nul
mkdir "%Systemdrive%\PDF24\"

rmdir "%homedrive%%homepath%\Downloads\%Ordner%PDF24" /s /q 2>nul

msiexec /a "%~dp0pdf24-creator.msi" /qb TARGETDIR="%Systemdrive%\PDF24\"

ren "%Systemdrive%\PDF24\Program Files\PDF24\lang\german.lang" german.bak
del "%Systemdrive%\PDF24\Program Files\PDF24\lang\*.lang" /f /q 1>nul 2>nul
ren "%Systemdrive%\PDF24\Program Files\PDF24\lang\german.bak" german.lang

ren "%Systemdrive%\PDF24\Program Files\PDF24\lib\wx\i18n\de.mo" de.bak
del "%Systemdrive%\PDF24\Program Files\PDF24\lib\wx\i18n\*.mo" /f /q 1>nul 2>nul
ren "%Systemdrive%\PDF24\Program Files\PDF24\lib\wx\i18n\de.bak" de.mo

ren "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\Locales\de.pak" de.bak
del "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\Locales\*.pak" /f /q 1>nul 2>nul
ren "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\Locales\de.bak" de.pak

rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ach" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\an" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\af" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\am" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ar" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\as" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\az" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ast" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\be" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\bg" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\bn" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\bn_IN" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\bo" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\br" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\brx" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\bs" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ca" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ca@valencia" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\cak" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ckb" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\common" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\cs" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\cy" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\da" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\dgo" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\dsb" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\dz" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\el" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\en-ca" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\en_GB" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\en_US" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\en_ZA" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\eo" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\es" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\es-ar" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\es-cl" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\es-es" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\es-mx" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\et" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\eu" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\fa" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\fi" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ff" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\fr" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\fur" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\fy" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\fy-nl" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ga" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ga-ie" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\gd" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\gl" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\gn" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\gu" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\gu-IN" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\gug" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\he" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\hi" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\hi-IN" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\hr" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\hsb" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\hu" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\hy-AM" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ia" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\id" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\is" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\it" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ja" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ka" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\kab" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\kk" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\km" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\kmr@latin" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\kn" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ko" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\kok" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ks" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\lb" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\lij" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\lo" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\lt" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ltg" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\lv" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\mai" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\mk" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ml" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\mn" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\mni" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\mr" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ms" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\my" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\nb" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\nb-NO" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ne" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ne-NP" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\nl" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\nn" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\nn-NO" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\nr" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\nso" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\oc" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\om" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\or" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\pa_IN" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\pa-IN" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\pl" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\pt" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\pt_BR" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\pt-BR" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\pt-PT" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ro" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\rm" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ru" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\rw" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sa_IN" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sat" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\scn" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sd" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\si" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sid" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sk" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sl" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\son" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sq" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sr" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sr@latin" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ss" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\st" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sv" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sv-SE" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\sw_TZ" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\szl" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ta" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\te" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\tg" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\th" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\tl" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\tn" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\tr" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\trs" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ts" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\tt" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ug" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\uk" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ur" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\uz" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\ve" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\vec" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\vi" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\wo" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\xh" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\zh-CN" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\zh-TW" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib\wtools\js\pdfjs\web\locale\zu" /s /q 2>nul

rmdir "%Systemdrive%\PDF24\Program Files\PDF24\qpdf\doc" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\gs\doc" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\gs\examples" /s /q 2>nul
cls
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo 			    soll nur der Druckertreiber installiert werden, drücken sie "D"
echo.
echo 			     PDF24 Weboberfläche zusätzlich, drücken Sie "W" (+ ca.300MB)
Echo ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
@CHOICE /C DW /M "Drücken Sie D für only Driver, W für zusätzlich Weboberfläche "
if errorlevel 2 GOTO WEBVIEW
if errorlevel 1 GOTO Driver

:WEBVIEW
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\edge_feedback" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\Extensions" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\MEIPreload" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\MLModels" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\Notifications" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\PDFPreview" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\Trust Protection Lists" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2\WidevineCdm" /s /q 2>nul

goto NEXT


:Driver
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\WebView2" /s /q 2>nul

rmdir "%Systemdrive%\PDF24\Program Files\PDF24\lib" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\qpdf" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\tesseract" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\twain" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\jre" /s /q 2>nul

del "%Systemdrive%\PDF24\Program Files\PDF24\pdf24-Creator.exe" /f /q 1>nul 2>nul
del "%Systemdrive%\PDF24\Program Files\PDF24\pdf24-DocTool.exe" /f /q 1>nul 2>nul
del "%Systemdrive%\PDF24\Program Files\PDF24\pdf24-Toolbox.exe" /f /q 1>nul 2>nul
del "%Systemdrive%\PDF24\Program Files\PDF24\pdf24-OCR.exe" /f /q 1>nul 2>nul

del "%Systemdrive%\PDF24\Program Files\PDF24\pdf24-Compress.exe" /f /q 1>nul 2>nul
del "%Systemdrive%\PDF24\Program Files\PDF24\pdf24-FAX.exe" /f /q 1>nul 2>nul
del "%Systemdrive%\PDF24\Program Files\PDF24\pdf24-Launcher.exe" /f /q 1>nul 2>nul
del "%Systemdrive%\PDF24\Program Files\PDF24\pdf24-Reader.exe" /f /q 1>nul 2>nul


:NEXT
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\licenses" /s /q 2>nul
rmdir "%Systemdrive%\PDF24\Program Files\PDF24\jre\legal" /s /q 2>nul

del "%Systemdrive%\PDF24\*.msi" /f /q 1>nul 2>nul


xcopy "%Systemdrive%\PDF24\Program Files\PDF24" "%homedrive%%homepath%\Downloads\%Ordner%PDF24" /i /y /s /e 1>nul 2>nul
rmdir "%Systemdrive%\PDF24\" /s /q 1>nul 2>nul

start cmd.exe /k "%homedrive%%homepath%\Downloads\%Ordner%PDF24\pdf24.exe" -install
start cmd.exe /k "%homedrive%%homepath%\Downloads\%Ordner%PDF24\pdf24.exe" -start

net stop spooler
PING >NUL -n 10 localhost
net start spooler
PING >NUL -n 4 localhost

"%homedrive%%homepath%\Downloads\%Ordner%PDF24\pdf24-PrinterInstall.exe" -printerName "PDF24_Printer" -portName "\\.\pipe\PDFPrint" -serviceName "PDF24" installPrinter addService

rundll32 printui.dll,PrintUIEntry /y /q /n "Microsoft Print to PDF"
rundll32 printui.dll,PrintUIEntry /y /q /n "PDF24_Printer"
rem wmic printer where name="PDF24_Printer" call setdefaultprinter

rem "%homedrive%%homepath%\Downloads\%Ordner%PDF24\pdf24.exe"
net start "PDF24"
taskkill /im conhost.exe /f
del "%homedrive%%homepath%\Downloads\%Ordner%PDF24\license_German.txt" /f /q 1>nul 2>nul
del "%homedrive%%homepath%\Downloads\%Ordner%PDF24\license_English.txt" /f /q 1>nul 2>nul

goto exit
:Fehler
Echo Es konnte keine PDF24 Installationsdatei im Ordner %~dp0 gefunden werden
Echo Ist das Internet verfügbar?! Kein Netz > Fehler kein Download!
Echo Bitte lade zunächst die aktuelle PDF24 Installationsdatei (X86 oder X64) im msi Format herunter
Echo https://www.pdf24.org/products/pdf-creator/download/pdf24-creator.msi
Echo https://tools.pdf24.org/de/creator
start "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"--profile-directory=Default https://www.pdf24.org/products/pdf-creator/download/pdf24-creator.msi
rem start iexplore https://www.pdf24.org/products/pdf-creator/download/pdf24-creator.msi
del "%homepath%\Downloads\PortableAppz\PortableApps\PDF24\Fehler" /f /q

goto Download

:EXIT
exit
Viel Spaß!
PDF24 angepasste Installation (nur PDF Druckertreiber) per Script: viewtopic.php?t=30284
Winget (Desktop App Installer) für Windows Versionen ohne Store installieren (HowTo): viewtopic.php?t=26214
Vorstellung: tiny11builder; Script zur Verschlankung von Windows 11: viewtopic.php?t=30134
Windows StartMenü Empfohlen (Recommended Section) komplett ausblenden: viewtopic.php?t=30574
Hyper-V VM per Script erstellen viewtopic.php?t=25114

Tante Google

PDF24 angepasste Installation (nur PDF Druckertreiber) per Script

Beitrag von Tante Google » 11.05.2023, 20:41


Antworten