Skip to content

Instantly share code, notes, and snippets.

@mwallner
Created January 26, 2017 19:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwallner/3ff3de99195feb62bfa65092d56296cd to your computer and use it in GitHub Desktop.
Save mwallner/3ff3de99195feb62bfa65092d56296cd to your computer and use it in GitHub Desktop.
chocolatey bug ? - Install-BinFile on PowerShell script
E:\ps1crash>ps1crash
Unbehandelte Ausnahme: System.ComponentModel.Win32Exception: Die angegebene ausf
ührbare Datei ist keine gültige Anwendung für diese Betriebssystemplattform.
bei System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startI
nfo)
bei shim.CommandExecutor.execute(String process, String arguments, String wor
king_directory, Boolean is_gui, Boolean wait_for_exit, Boolean requires_elevatio
n)
bei shim.ShimProgram.Main(String[] args)
E:\ps1crash>cinst ps1crash.0.0.0.1.nupkg -y -s .
Chocolatey v0.10.3 Business
Installing the following packages:
ps1crash.0.0.0.1.nupkg
By installing you accept licenses for the packages.
ps1crash v0.0.0.1
ps1crash package files install completed. Performing other installation steps.
Added C:\ProgramData\chocolatey\bin\ps1crash.exe shim pointed to '..\lib\ps1cras
h\tools\ps1crash.ps1'.
The install of ps1crash was successful.
Software install location not explicitly set, could be in package or
default install location if installer.
Chocolatey installed 1/1 packages. 0 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
<?xml version="1.0" encoding="utf-8"?>
<!-- Do not remove this test for UTF-8: if “Ω” doesn’t appear as greek uppercase omega letter enclosed in quotation marks, you should use an editor that supports UTF-8, not this one. -->
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>ps1crash</id>
<version>0.0.0.1</version>
<title>ps1crash (Install)</title>
<authors>mwallner</authors>
<projectUrl>htttp://mwallner.net</projectUrl>
<tags>ps1crash admin</tags>
<summary>uses Install-BinFile on ps</summary>
<description>sample for bugreport</description>
</metadata>
<files>
<file src="tools\**" target="tools" />
</files>
</package>
$ErrorActionPreference = 'Stop';
$packageName= 'vs2010'
$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)"
$ps1FilePath = Join-Path $toolsDir "ps1crash.ps1"
Install-BinFile -Name ps1crash -Path $ps1FilePath
Write-Output "I <3 chocolatey"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment