Difference between revisions of "PaintDotNet"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
m (version 3.5.8)
(updated to latest version, removed obsolete information and corrected broken links)
Line 1: Line 1:
This is a silent installer, upgrader and uninstaller for Paint.NET.
+
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_.NET_Framework_3.5_SP1|.Net framework 3.5 SP1]]
+
*[[Microsoft_.NET_Framework#Microsoft_.NET_Framework_3.5_SP1|.NET Framework 3.5 SP1]]
  
== Create .msi ==
+
== Extract .msi packages ==
To do this download the installer and run it with the [http://www.eecs.wsu.edu/paint.net/doc/2.6/Help/en/UnattendedInstallation.html options] you want making sure to add "/createMsi":
+
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">
 
<source lang="dos">
 
Paint.NET.3.5.8.Install.exe /createMsi CHECKFORUPDATES=0 CHECKFORBETAS=0 JPGPNGBMPEDITOR=1 TGAEDITOR=1 ALLUSERS=1 DESKTOPSHORTCUT=0
 
Paint.NET.3.5.8.Install.exe /createMsi CHECKFORUPDATES=0 CHECKFORBETAS=0 JPGPNGBMPEDITOR=1 TGAEDITOR=1 ALLUSERS=1 DESKTOPSHORTCUT=0
 
</source>
 
</source>
This will create a folder on the desktop called "PaintDotNetMsi" with two files in it: "PaintDotNet.x64.msi" and "PaintDotNet.x86.msi".  Copy the "PaintDotNet.x86.msi" to your server.
 
  
== 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.
 +
<source lang="dos">
 +
@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
 +
 
 +
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 ==
 
<source lang="xml">
 
<source lang="xml">
 
<?xml version="1.0" encoding="UTF-8"?>
 
<?xml version="1.0" encoding="UTF-8"?>
  
<packages>
+
<packages
 +
        xmlns:xsi="http://www.wpkg.org/packages"
 +
        xsi:noNamespaceSchemaLocation="../xsd/packages.xsd" >
  
<package
+
    <package id="PaintNET"  
id="paintdotnet"
+
            name="Paint.NET"  
name="Paint.Net 3.5.8"
+
            revision="%PKG_VERSION%"  
revision="358"
+
            reboot="false"  
reboot="false"
+
            priority="10">
priority="0">
+
+
<depends package-id="dotnet35" />
+
+
<check type="uninstall" condition="exists" path="Paint.NET v3.5.8" />
+
+
<!-- first remove old versions (or it won't upgrade), then install the new version -->
+
<install cmd='msiexec /qn /x {43602F34-1AA3-44FB-AEB2-D08C2C73743F}'><exit code='any' /></install>
+
<install cmd='msiexec /qn /x {4F77F6EE-2C99-49F7-940A-2E9C208C3BE1}'><exit code='any' /></install>
+
<install cmd='msiexec /qn /x {F0E2B312-D7FD-4349-A9B6-E90B36DB1BD0}'><exit code='any' /></install>
+
<install cmd='msiexec /qn /x {639673E9-D53F-44F4-A046-485C8A6ADA15}'><exit code='any' /></install>
+
<install cmd='msiexec /qn /x {45212F71-750F-4B98-8931-2F35DBE6B661}'><exit code='any' /></install>
+
<install cmd='msiexec /qn /i %SOFTWARE%\paintdotnet\PaintDotNet.x86.msi' />
+
+
<!-- first remove old versions (or it won't upgrade), then install the new version -->
+
<upgrade cmd='msiexec /qn /x {43602F34-1AA3-44FB-AEB2-D08C2C73743F}'><exit code='any' /></upgrade>
+
<upgrade cmd='msiexec /qn /x {4F77F6EE-2C99-49F7-940A-2E9C208C3BE1}'><exit code='any' /></upgrade>
+
<upgrade cmd='msiexec /qn /x {F0E2B312-D7FD-4349-A9B6-E90B36DB1BD0}'><exit code='any' /></upgrade>
+
<upgrade cmd='msiexec /qn /x {639673E9-D53F-44F4-A046-485C8A6ADA15}'><exit code='any' /></upgrade>
+
<upgrade cmd='msiexec /qn /x {45212F71-750F-4B98-8931-2F35DBE6B661}'><exit code='any' /></upgrade>
+
<upgrade cmd='msiexec /qn /i %SOFTWARE%\paintdotnet\PaintDotNet.x86.msi' />
+
+
<remove cmd='msiexec /qn /x {9CF4A37B-A8C4-44D7-8C53-13B9D9594BB2}' />
+
</package>
+
  
 +
        <variable name="PKG_VERSION"    value="3.5.10" />
 +
        <variable name="PKG_REG_VERSION" value="3.60.0" />
 +
        <variable name="PKG_EXE_VERSION" value="3.510.4297.28970" />
 +
 +
        <check type="uninstall" condition="versiongreaterorequal" path="Paint.NET v%PKG_VERSION%"                value="%PKG_REG_VERSION%" />
 +
        <check type="file"      condition="versiongreaterorequal" path="%ProgramFiles%\Paint.NET\PaintDotNet.exe" value="%PKG_EXE_VERSION%" />
 +
 +
        <install cmd='MsiExec /passive /i "%SOFTWARE%\Paint.Net\Paint.NET.%PKG_VERSION%.Install_%PROCESSOR_ARCHITECTURE%.msi"'/>
 +
 +
        <upgrade include="install"/>
 +
 +
        <remove cmd='msiexec /passive /x "%SOFTWARE%\Paint.Net\Paint.NET.%PKG_VERSION%.Install_%PROCESSOR_ARCHITECTURE%.msi"' />
 +
    </package>
 
</packages>
 
</packages>
 
</source>
 
</source>
 
Note: If you already have a previous version of Paint.NET installed you cannot install a new version until you uninstall the old one.  You need to know the MSI product code GUID to uninstall the previous version.  To find the GUID of the Paint.NET version you currently have installed run C:\Program Files\Paint.NET\PdnRepair.exe and look for the MSI product code GUID.
 
  
 
== External links ==
 
== External links ==
* [http://www.getpaint.net/doc/latest/en/UnattendedInstallation.html Paint.NET Help - Unattended installation]
+
* [http://www.getpaint.net/doc/latest/UnattendedInstallation.html Paint.NET Help - Unattended installation]
  
  
 
[[category:Silent Installers]]
 
[[category:Silent Installers]]
 +
[[category:MSI]]

Revision as of 20:48, 9 October 2011

This is a silent installer, updater and remover for Paint.NET.

Paint.NET is a spiffy image editor for Windows using C#.

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

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

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

<?xml version="1.0" encoding="UTF-8"?>

<packages
        xmlns:xsi="http://www.wpkg.org/packages"
        xsi:noNamespaceSchemaLocation="../xsd/packages.xsd" >

    <package id="PaintNET" 
            name="Paint.NET" 
            revision="%PKG_VERSION%" 
            reboot="false" 
            priority="10">

        <variable name="PKG_VERSION"     value="3.5.10" />
        <variable name="PKG_REG_VERSION" value="3.60.0" />
        <variable name="PKG_EXE_VERSION" value="3.510.4297.28970" />

        <check type="uninstall" condition="versiongreaterorequal" path="Paint.NET v%PKG_VERSION%"                 value="%PKG_REG_VERSION%" />
        <check type="file"      condition="versiongreaterorequal" path="%ProgramFiles%\Paint.NET\PaintDotNet.exe" value="%PKG_EXE_VERSION%" />

        <install cmd='MsiExec /passive /i "%SOFTWARE%\Paint.Net\Paint.NET.%PKG_VERSION%.Install_%PROCESSOR_ARCHITECTURE%.msi"'/>

        <upgrade include="install"/>

        <remove cmd='msiexec /passive /x "%SOFTWARE%\Paint.Net\Paint.NET.%PKG_VERSION%.Install_%PROCESSOR_ARCHITECTURE%.msi"' />
    </package>
</packages>

External links