Please make sure you’ve read over and agree with the etiquette regarding communication. Note that while automatically generated shims will be removed on uninstall automatically, shims created with Install-BinFile need to be manually removed on package uninstall using Uninstall-BinFile from join in the conversation about Chocolatey in our Community Chat Room. Where a program gets installed depends on the default location of the installer, and whether the installer allows you to override it. You would optionally generate shims for programs not automatically placed on the PATH for convenience, in the case a shim is not automatically generated. Search for the error codes that start with ERROR_SUCCESS for the success codes you may need to support. See this page for more information about standard installer exit codes. The ones I used in my sample mean success ( 0) and reboot required ( 1638). ValidExitCodes: Any exit codes that should be treated as a successful install.File: Relative or absolute path to the installer file.SilentArgs: Any arguments required to perform a silent installation of the program.FileType: Is this an 'exe' or an 'msi'?.PackageName: This is the name (id) of the package.See here for more information on Chocolatey environment variables. This variable only exists in the context of a Chocolatey package install. Install-ChocolateyInstallPackage your setup.exe is embedded inside the package, you can reference the current package folder directory with the following environment variable: $env:chocolateyPackageFolder. ValidExitCodes = 0, 1638 # array of acceptable return codes for the installer SilentArgs = '/q /someOtherArguments' # This line is going to be installer specific, and is just a sample hereįile = 'C:\Path\to\installer' # can be a relative path too A sample of how you would do this in chocolateyInstall.ps1 for a setup exe would be: $packageInstallArgs = 'package-name' You don't want to set up a shim for the installer - you want to invoke the installer from chocolateyInstall.ps1 to install the program.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |