PaintDotNet

From WPKG | Open Source Software Deployment and Distribution
Revision as of 15:29, 10 October 2011 by StefanP (Talk | contribs)
Jump to: navigation, search

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

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

Contents

Requirements

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

!!! This package requires wpkg.js 1.2.1-RC20 or higher !!!

<?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">
 
        <depends package-id="dotnet35" />
 
        <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" />
        <variable name="PKG_INSTALL_SWITCH" value="ALLUSERS=1 DESKTOPSHORTCUT=0 CHECKFORUPDATES=0"/>
 
        <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" %PKG_INSTALL_SWITCH%'/>
 
        <upgrade include="install"/>
 
        <remove cmd='msiexec /passive /x "%SOFTWARE%\Paint.Net\Paint.NET.%PKG_VERSION%.Install_%PROCESSOR_ARCHITECTURE%.msi"' />
    </package>
</packages>

External links

Retrieved from "http://wpkg.org/PaintDotNet"
Personal tools
Namespaces
Variants
Actions
Navigation
ideas?
Toolbox