Paint.net

From psadt | Evergreen Application Management
Revision as of 11:30, 23 July 2020 by Nick (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

Paint.net.png


Paint.net is a freeware raster graphics editor program for Microsoft Windows, developed on the .NET Framework.

Version 4.2.10


Assumptions

This document assumes the reader is familiar with the use of a Windows Administrator Command Prompt, and how to create a MSI Transform. It also assumes your copy of the PSADT is preconfigured to write logs to C:\ProgramData\Logs.

Obtain Package Source

Download the installer from dotPDN.


Prerequisites

Microsoft .Net Framework 4.7.1


Extract MSI installer

As per instructions on vendor website, a 64-bit MSI installer can be extracted as follows:

Extract the executable from the zipped archive and run:

paint.net.4.2.10.install.exe /createMSI

This will extract the MSI installers to a folder on the Desktop. Copy the 64-bit MSI installer to your package folder.


Deploy Info

paint.net
dotPDN LLC
C:\Program Files\paint.net\PaintDotNet.exe

Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{15BCA3AB-444B-4AC5-A04F-F2AD0F7AD3EC}
Value: DisplayVersion
DataType: Version
Data: 4.2.10
Operator: Greater than or equal to
32-bit: No
SCCM Requirement: None


Notes

A Transform file was created for the vendor MSI to suppress the desktop shortcut. Any legacy versions of the software removed by the script are logged.


Deploy-Application.ps1

##*===============================================
##* VARIABLE DECLARATION
##*===============================================
## Variables: Application
[string]$appVendor = 'dotPDN'
[string]$appName = 'paint.net'
[string]$appVersion = '4.2.10'
[string]$appArch = 'x64'
[string]$appLang = 'EN'
[string]$appRevision = '01'
[string]$appScriptVersion = '1.0.0'
[string]$appScriptDate = '05/05/2020'
[string]$appScriptAuthor = 'psadt.com'
##*===============================================



##*===============================================
##* PRE-INSTALLATION
##*===============================================


# Remove previous versions if exist
Write-Log -Message "Check for and uninstall previous versions of paint.net" -LogType 'CMTrace'

# Uninstall
$UninstMSI = Get-WmiObject -Class win32_product | where { $_.Name -like "*paint.net*"}
If ($UninstMSI -ne $null)
	{
	ForEach ($app in $UninstMSI)
		{
		[string]$appName = $($app.Name)
		[string]$pkgGUID = $($app.IdentifyingNumber)
		[string]$oldVersion = $($app.Version)
		[string]$Parms = "REBOOT=R /qn /l*v `"$env:ProgramData\Logs\$appName $oldVersion MSI Uninstall.log`""
		Write-Log -Message "Uninstalling $appName $oldVersion" -LogType 'CMTrace'
		Write-Log -Message "MsiExec.exe /x $pkgGUID $Parms" -LogType 'CMTrace'
		Start-Process -FilePath MsiExec.exe -ArgumentList "/x $pkgGUID $Parms" -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null
		}
	}
Else
	{Write-Log -Message "No $appName installations detected." -LogType 'CMTrace'}



##*===============================================
##* INSTALLATION 
##*===============================================


Execute-MSI -Action 'Install' -Path 'PaintDotNet_x64.msi' -Transform 'dotPDN_PaintDotNet_4.2.10.mst' -PassThru -ContinueOnError $true




##*===============================================
##* UNINSTALLATION
##*===============================================


# Remove any version if exist
Write-Log -Message "Check for and uninstall previous versions of paint.Net" -LogType 'CMTrace'

# Uninstall
$UninstMSI = Get-WmiObject -Class win32_product | where { $_.Name -like "*paint.net*"}
If ($UninstMSI -ne $null)
	{
	ForEach ($app in $UninstMSI)
		{
		[string]$appName = $($app.Name)
		[string]$pkgGUID = $($app.IdentifyingNumber)
		[string]$oldVersion = $($app.Version)
		[string]$Parms = "REBOOT=R /qn /l*v `"$env:ProgramData\Logs\$appName $oldVersion MSI Uninstall.log`""
		Write-Log -Message "Uninstalling $appName $oldVersion" -LogType 'CMTrace'
		Write-Log -Message "MsiExec.exe /x $pkgGUID $Parms" -LogType 'CMTrace'
		Start-Process -FilePath MsiExec.exe -ArgumentList "/x $pkgGUID $Parms" -Wait -PassThru -NoNewWindow -ErrorAction SilentlyContinue -WarningAction SilentlyContinue | Out-Null
		}
	}
Else
	{
	Write-Log -Message "No $appName installations detected." -LogType 'CMTrace'
	Exit-Script -ExitCode 1605
	}


Manual installation

Paint01.png

Wait for the files to be extracted


Paint02.png

Select Custom, click Next


Paint03.png

Accept EULA, click Next


Paint04.png

Untick all and click Next


Paint05.png

Click Next


Paint06.png

Click Next


Paint07.png

Please wait ...


Paint08.png

Please wait ...


Paint09.png

Click Finish