Downloads:

21,252

Downloads of v 3.0.0.4:

609

Last Update:

1/12/2015

Package Maintainer(s):

Software Author(s):

  • Patch My PC

Tags:

Admin Software Update Updates

Patch my PC

This is not the latest version of Patch my PC available.

3.0.0.4 | Updated: 1/12/2015

Downloads:

21,252

Downloads of v 3.0.0.4:

609

Maintainer(s):

Software Author(s):

  • Patch My PC

Patch my PC 3.0.0.4

This is not the latest version of Patch my PC available.

All Checks are Unknown

2 Test of Unknown Status


Validation Testing Unknown


Verification Testing Unknown

To install Patch my PC, run the following command from the command line or from PowerShell:

>

To upgrade Patch my PC, run the following command from the command line or from PowerShell:

>

To uninstall Patch my PC, run the following command from the command line or from PowerShell:

>

NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to https://chocolatey.org/api/v2. Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to https://chocolatey.org/api/v2)

4. Choose your deployment method:


choco upgrade patch-my-pc -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:


choco upgrade patch-my-pc -y --source="'STEP 3 URL'" 
$exitCode = $LASTEXITCODE

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0
}

Exit $exitCode

- name: Ensure patch-my-pc installed
  win_chocolatey:
    name: patch-my-pc
    state: present
    version: 3.0.0.4
    source: STEP 3 URL

See docs at https://docs.ansible.com/ansible/latest/modules/win_chocolatey_module.html.

Coming early 2020! Central Managment Reporting available now! More information...


chocolatey_package 'patch-my-pc' do
  action    :install
  version  '3.0.0.4'
  source   'STEP 3 URL'
end

See docs at https://docs.chef.io/resource_chocolatey_package.html.


Chocolatey::Ensure-Package
(
    Name: patch-my-pc,
    Version: 3.0.0.4,
    Source: STEP 3 URL
);

Requires Otter Chocolatey Extension. See docs at https://inedo.com/den/otter/chocolatey.


cChocoPackageInstaller patch-my-pc
{
   Name     = 'patch-my-pc'
   Ensure   = 'Present'
   Version  = '3.0.0.4'
   Source   = 'STEP 3 URL'
}

Requires cChoco DSC Resource. See docs at https://github.com/chocolatey/cChoco.


package { 'patch-my-pc':
  provider => 'chocolatey',
  ensure   => '3.0.0.4',
  source   => 'STEP 3 URL',
}

Requires Puppet Chocolatey Provider module. See docs at https://forge.puppet.com/puppetlabs/chocolatey.


salt '*' chocolatey.install patch-my-pc version="3.0.0.4" source="STEP 3 URL"

See docs at https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.chocolatey.html.

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator ferventcoder on 1/15/2015.

Description

Patch My PC helps to simplify the process of keeping your software up to date.

Link to start menu is no longer working. Looking for a package writer who can fix this.


tools\chocolateyInstall.ps1
$name = 'Patch my PC'
$id = 'patch-my-pc'
$url = 'http://patchmypc.net/PatchMyPC.exe'
$pwd = "$(split-path -parent $MyInvocation.MyCommand.Definition)"

# Combatibility - This function has not been merged
if (!(Get-Command Install-ChocolateyPinnedItem -errorAction SilentlyContinue)) {
	Import-Module "$($pwd)\Install-ChocolateyPinnedItem.ps1"
}

try {

	$installDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
    $chocTempDir = Join-Path $env:TEMP "chocolatey"
    $tempDir = Join-Path $chocTempDir "$id"

	# Calculate $binRoot, which should always be set in $env:ChocolateyBinRoot as a full path (not relative)
	$binRoot = Get-BinRoot;

    Write-Host "Downloading to: $nugetExePath";
    $tempFile = Join-Path $nugetExePath "PatchMyPC.exe"

    Get-ChocolateyWebFile $id "$tempFile" "$url"

	# Copy shortcut to start menu

	Install-ChocolateyPinnedItem $tempFile

    Write-ChocolateySuccess $name
} catch {
	Write-ChocolateyFailure $name $($_.Exception.Message)
	throw
}
tools\Install-ChocolateyPinnedItem.ps1
function Install-ChocolateyPinnedItem {
  	param(
		[string]$target, 
		[string]$taskbar
	)

	# We need to know the translation for the Explorer context-menu item for pinning an item to the start-menu or taskbar.
	# Be careful. Commands vary from Windows version to version. E.g. Win7 -> Startmenu; Win8 -> Start;
	# We need loose matching. So we want to match the action (Pin) and the target (Start(menu) or Task(bar)) separately.
	
	# Translations
	# PLEASE ADD LANGUAGES 
	# or even better, figure out a way to pin items to start without using this MONSTROUS trick.

	# Pin (to start)
	$verbPin = @{}
	$verbPin['da-DK'] = "Fastgør"
	$verbPin['en-US'] = "Pin" 
	$verbPin['fi-FI'] = "Kiinnitä"
	$verbPin['nb-NO'] = "Fest"
	$verbPin['nl-NL'] = "Vastmaken" 
	$verbPin['sv-SE'] = "Fäst"

	# (Pin to) Start
	$verbStart = @{}
	$verbStart['da-DK'] = "Start"
	$verbStart['en-US'] = "Start" 
	$verbStart['fi-FI'] = "Käynnistä"
	$verbStart['nb-NO'] = "Start"
	$verbStart['nl-NL'] = "Start" 
	$verbStart['sv-SE'] = "Start"
	
	# (Pin to) Taskbar
	$verbTask = @{}
	$verbTask['da-DK'] = "Proceslinje"
	$verbTask['en-US'] = "Task" 
	$verbTask['fi-FI'] = "Tehtävälkkiin"
	$verbTask['nb-NO'] = "Oppgavelinjen"
	$verbTask['nl-NL'] = "Taak" 
	$verbTask['sv-SE'] = "Aktivitetsfältet"

	# Get Locale
	$locale = (get-culture).Name
	# Not sure if get-culture < Windows 8, better not use
	
	# Usage
	if ($target -eq "") { 
		write-host "usage: Install-ChocolateyPinnedItem <file to pin> [-taskbar true]" 
		write-host "       -taskbar true (executable only) pins target to desktop TaskBar in stead of Start"
	} 
	else { 
		# Switch for Taskbar instead of Start
		if ($taskbar -ne "") {
			$verbAction = $verbTask
		} else {
			$verbAction = $verbStart
		}		

		# Path exists?
		if (-not (test-path "$target")) {
			write-host "No such file: '$target'";
			exit
		}

		$pinned		= $false
		$path		= split-path "$target"
		$file		= split-path "$target" -leaf
		$explorer	= new-object -com "Shell.Application" 
		$folder		= $explorer.nameSpace($path)   
		$item		= $folder.parseName($file)
		$options	= $item.Verbs()	# > $null # This will still output irrelevant warnings for certain context menu items such as github. How to I hide these?

		
		foreach ($option in $options) {
			$oName = $option.Name.Replace("&","")
			
			# Be careful. Commands vary from Windows version to version. E.g. Win7 -> Startmenu; Win8 -> Start;
			# We need loose matching.
			
			# WARNING - This trick might also cause UNpinning if $file was already pinned!
			
			# First, match Pin
			foreach ($vPin in $verbPin.values) {
				if ($oName -imatch $vPin) {
					# Second, match action (either Start or Task(bar))
					foreach ($vAction in $verbAction.values) {
						if ($oName -imatch $vAction) {
							# write-host "Locale detected: $($vAction.key)" # Don't know key in values-foreach
							write-host "Command detected: $oName"
							write-host "Executing '$oName' for '$target'"
							$option.DoIt()
							$pinned = $true
							break
						}
					}
					if ($pinned) { break }
				}
			}
		}
		if ($pinned) { write-host "Succesfully Pinned '$file'" }
		else { write-host "Could not pin '$file'" }
	}
}
tools\PatchMyPC.exe.GUI
 
tools\uninstall.txt
C:\Windows\System32\msiexec.exe /x {F6881752-3DD7-44C9-9AC6-D827A1E641CC}

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Patch my PC 4.1.0.2 1153 Tuesday, January 1, 2019 Approved
Patch my PC 4.1.0.1 499 Friday, September 14, 2018 Approved
Patch my PC 4.1.0.0 236 Tuesday, August 21, 2018 Approved
Patch my PC 4.0.1.5 544 Tuesday, April 10, 2018 Approved
Patch my PC 4.0.1.4 265 Sunday, March 25, 2018 Approved
Patch my PC 4.0.1.3 197 Thursday, March 22, 2018 Approved
Patch my PC 4.0.0.7 593 Friday, March 9, 2018 Approved
Patch my PC 4.0.0.6 221 Saturday, March 3, 2018 Approved
Patch my PC 4.0.0.5 207 Wednesday, February 28, 2018 Approved

This package has no dependencies.

Discussion for the Patch my PC Package

Ground Rules:

  • This discussion is only about Patch my PC and the Patch my PC package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Patch my PC, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus