Difference between revisions of "PaintDotNet"
From WPKG | Open Source Software Deployment and Distribution
m |
(→Package for 32-bit and 64-bit Windows) |
||
(23 intermediate revisions by 9 users not shown) | |||
Line 1: | Line 1: | ||
− | This is a silent installer, | + | This is a silent installer, updater and remover for Paint.NET. |
[http://www.getpaint.net/ Paint.NET] is a spiffy image editor for Windows using C#. | [http://www.getpaint.net/ Paint.NET] is a spiffy image editor for Windows using C#. | ||
Line 6: | Line 6: | ||
*Administrator access | *Administrator access | ||
*Create a .msi from the .exe (/auto on the .exe will fail if you're using the WPKG Client or running WPKG over ssh and it has no option to run silently either) | *Create a .msi from the .exe (/auto on the .exe will fail if you're using the WPKG Client or running WPKG over ssh and it has no option to run silently either) | ||
− | *[[Microsoft_.NET_Framework#Microsoft_. | + | *[[Microsoft_.NET_Framework#Microsoft_.NET_Framework_3.5_SP1|.NET Framework 3.5 SP1]] |
− | == | + | == Extract .msi packages == |
− | To do this download the installer and run it with the [http://www. | + | To do this download the installer and run it with the [http://www.getpaint.net/doc/latest/UnattendedInstallation.html options] you want, making sure to add "/createMsi": |
− | < | + | <source lang="dos"> |
− | Paint.NET.3. | + | Paint.NET.3.5.8.Install.exe /createMsi CHECKFORUPDATES=0 CHECKFORBETAS=0 JPGPNGBMPEDITOR=1 TGAEDITOR=1 ALLUSERS=1 DESKTOPSHORTCUT=0 |
− | </ | + | </source> |
− | + | If you experience issues with the MSI installers taking between 45 minutes to an hour then you might want to delay the .NET optimization by adding "QUEUENGEN=1" after the "/createMsi" switch (See REM line in below CreateMSI script)as explained in this [http://forums.getpaint.net/index.php?/topic/23961-paintnet-takes-almost-an-hour-to-install/ forum] | |
− | == Package | + | Another way is to use the command script below and specify the MSI properties individually. |
− | < | + | In addition this renames the MSI packages to allow using the PROCESSOR_ARCHITECTURE environment variable. |
− | <package | + | <source lang="dos"> |
− | id=" | + | @rem Create_Install_Packages.cmd |
− | name=" | + | @echo off |
− | revision=" | + | |
+ | set script_name=%~nx0 | ||
+ | set script_dir=%~dp0 | ||
+ | set script_ext=%~x1 | ||
+ | |||
+ | if "X%1" == "X" goto :usage | ||
+ | if not "%script_ext%" == ".exe" goto :usage | ||
+ | |||
+ | set installer=%~1 | ||
+ | set installer_name=%~n1 | ||
+ | |||
+ | echo. | ||
+ | echo Extracting MSI packages ... | ||
+ | "%installer%" /createMsi | ||
+ | REM "%installer%" /createMsi QUEUENGEN=1 | ||
+ | |||
+ | echo. | ||
+ | echo Moving installers to software depot ... | ||
+ | echo. | ||
+ | move /Y "%USERPROFILE%\Desktop\PaintDotNetMsi\PaintDotNet.x64.msi" "%script_dir%\%installer_name%_AMD64.msi" && echo AMD64 package successfully moved ... | ||
+ | echo. | ||
+ | move /Y "%USERPROFILE%\Desktop\PaintDotNetMsi\PaintDotNet.x86.msi" "%script_dir%\%installer_name%_x86.msi" && echo x86 package successfully moved ... | ||
+ | |||
+ | echo. | ||
+ | echo Deleting temporary folder ... | ||
+ | rmdir /s /q "%USERPROFILE%\Desktop\PaintDotNetMsi" && echo Folder deleted successfully ... | ||
+ | |||
+ | echo. | ||
+ | pause | ||
+ | |||
+ | goto :EOF | ||
+ | |||
+ | :usage | ||
+ | echo. | ||
+ | echo Usage: | ||
+ | echo. | ||
+ | echo Drop the "Paint.NET.___.Install.exe" onto "%script_name%" to create the MSI packages. | ||
+ | echo. | ||
+ | pause | ||
+ | </source> | ||
+ | |||
+ | == Package for 32-bit and 64-bit Windows == | ||
+ | |||
+ | '''!!! This package requires wpkg.js 1.3.1 !!!''' | ||
+ | |||
+ | <source lang="xml"> | ||
+ | <package | ||
+ | id="paintnet" | ||
+ | name="Paint .NET" | ||
+ | revision="%PKG_VERSION%" | ||
reboot="false" | reboot="false" | ||
− | priority=" | + | priority="0"> |
− | < | + | <variable name="PKG_VERSION" value="4.2.10" /> |
− | + | <variable name="PKG_SOURCE" value="%SOFTWARE%\PaintNET\%PKG_VERSION%" /> | |
− | + | <variable name="PKG_NAME" value="PaintDotNet_x86.msi" architecture="x86" /> | |
+ | <variable name="PKG_NAME" value="PaintDotNet_x64.msi" architecture="x64" /> | ||
+ | <variable name="PKG_INSTALL_SWITCH" value="/qn" /> | ||
− | < | + | <check type="uninstall" condition="versiongreaterorequal" path="paint.net" value="%PKG_VERSION%" /> |
− | < | + | <install cmd='msiexec /i %PKG_SOURCE%\%PKG_NAME% %PKG_INSTALL_SWITCH%' /> |
+ | |||
+ | <upgrade include="install" /> | ||
+ | |||
+ | <remove cmd='wmic product where "name like 'paint.net'" call uninstall' /> | ||
</package> | </package> | ||
− | </ | + | </source> |
== External links == | == External links == | ||
− | * [http://www.getpaint.net/doc/latest | + | * [http://www.getpaint.net/doc/latest/UnattendedInstallation.html Paint.NET Help - Unattended installation] |
+ | * [http://forums.getpaint.net/index.php?/topic/23961-paintnet-takes-almost-an-hour-to-install/ Paint.NET Help - .NET Optimization] | ||
+ | |||
[[category:Silent Installers]] | [[category:Silent Installers]] | ||
+ | [[category:MSI]] |
Latest revision as of 21:52, 15 May 2020
This is a silent installer, updater and remover for Paint.NET.
Paint.NET is a spiffy image editor for Windows using C#.
Contents
[hide]Requirements
- Administrator access
- Create a .msi from the .exe (/auto on the .exe will fail if you're using the WPKG Client or running WPKG over ssh and it has no option to run silently either)
- .NET Framework 3.5 SP1
Extract .msi packages
To do this download the installer and run it with the options you want, making sure to add "/createMsi":
Paint.NET.3.5.8.Install.exe /createMsi CHECKFORUPDATES=0 CHECKFORBETAS=0 JPGPNGBMPEDITOR=1 TGAEDITOR=1 ALLUSERS=1 DESKTOPSHORTCUT=0
If you experience issues with the MSI installers taking between 45 minutes to an hour then you might want to delay the .NET optimization by adding "QUEUENGEN=1" after the "/createMsi" switch (See REM line in below CreateMSI script)as explained in this forum
Another way is to use the command script below and specify the MSI properties individually. In addition this renames the MSI packages to allow using the PROCESSOR_ARCHITECTURE environment variable.
@rem Create_Install_Packages.cmd
@echo off
set script_name=%~nx0
set script_dir=%~dp0
set script_ext=%~x1
if "X%1" == "X" goto :usage
if not "%script_ext%" == ".exe" goto :usage
set installer=%~1
set installer_name=%~n1
echo.
echo Extracting MSI packages ...
"%installer%" /createMsi
REM "%installer%" /createMsi QUEUENGEN=1
echo.
echo Moving installers to software depot ...
echo.
move /Y "%USERPROFILE%\Desktop\PaintDotNetMsi\PaintDotNet.x64.msi" "%script_dir%\%installer_name%_AMD64.msi" && echo AMD64 package successfully moved ...
echo.
move /Y "%USERPROFILE%\Desktop\PaintDotNetMsi\PaintDotNet.x86.msi" "%script_dir%\%installer_name%_x86.msi" && echo x86 package successfully moved ...
echo.
echo Deleting temporary folder ...
rmdir /s /q "%USERPROFILE%\Desktop\PaintDotNetMsi" && echo Folder deleted successfully ...
echo.
pause
goto :EOF
:usage
echo.
echo Usage:
echo.
echo Drop the "Paint.NET.___.Install.exe" onto "%script_name%" to create the MSI packages.
echo.
pause
Package for 32-bit and 64-bit Windows
!!! This package requires wpkg.js 1.3.1 !!!
<package
id="paintnet"
name="Paint .NET"
revision="%PKG_VERSION%"
reboot="false"
priority="0">
<variable name="PKG_VERSION" value="4.2.10" />
<variable name="PKG_SOURCE" value="%SOFTWARE%\PaintNET\%PKG_VERSION%" />
<variable name="PKG_NAME" value="PaintDotNet_x86.msi" architecture="x86" />
<variable name="PKG_NAME" value="PaintDotNet_x64.msi" architecture="x64" />
<variable name="PKG_INSTALL_SWITCH" value="/qn" />
<check type="uninstall" condition="versiongreaterorequal" path="paint.net" value="%PKG_VERSION%" />
<install cmd='msiexec /i %PKG_SOURCE%\%PKG_NAME% %PKG_INSTALL_SWITCH%' />
<upgrade include="install" />
<remove cmd='wmic product where "name like 'paint.net'" call uninstall' />
</package>