{"id":27160940,"url":"https://github.com/stutstev/powerpkg","last_synced_at":"2025-04-09T00:08:20.026Z","repository":{"id":135656293,"uuid":"577092423","full_name":"stutstev/powerpkg","owner":"stutstev","description":"Portable software package facilitator for improved control of deployments within a Windows enterprise environment. 🪟","archived":false,"fork":false,"pushed_at":"2022-12-11T23:46:14.000Z","size":222,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T22:43:17.365Z","etag":null,"topics":["deployments","enterprise","intune","mdm","mdt","packaging","powershell","software","windows"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stutstev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-11T23:46:03.000Z","updated_at":"2023-09-20T08:01:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1c1564a-5767-4023-a348-223715499069","html_url":"https://github.com/stutstev/powerpkg","commit_stats":null,"previous_names":["stutstev/powerpkg"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stutstev%2Fpowerpkg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stutstev%2Fpowerpkg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stutstev%2Fpowerpkg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stutstev%2Fpowerpkg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stutstev","download_url":"https://codeload.github.com/stutstev/powerpkg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947859,"owners_count":21023066,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deployments","enterprise","intune","mdm","mdt","packaging","powershell","software","windows"],"created_at":"2025-04-09T00:08:19.460Z","updated_at":"2025-04-09T00:08:20.019Z","avatar_url":"https://github.com/stutstev.png","language":"PowerShell","readme":"# powerpkg\n\nA Windows-exclusive software package facilitator; an installation script on steroids for enterprise MDM-hosted packages, with optional actions, conditions and exceptions as core features. It is deliberately designed to behave in accordance to an adjacent [configuration file](#package-file-packagexml), ensuring a low learning curve, code standardization among every instance, and easy software updates (when available).\n\n![](/img/header.gif)\n\n## Section\n\n1. [Requirement](#requirement)\n2. [Getting Started](#getting-started)\n3. [How It Works](#how-it-works)\n4. [Package File (`package.xml`)](#package-file-packagexml)\n    - [Script Configuration (`\u003cConfiguration\u003e`)](#script-configuration-configuration)\n        - [PackageName](#packagename)\n        - [BlockHost](#blockhost)\n        - [SuppressNotification](#suppressnotification)\n    - [Task Entry (`\u003cTaskEntry\u003e`)](#task-entry-taskentry)\n        - [TaskName](#taskname)\n        - [Executable](#executable)\n        - [OperatingSystem](#operatingsystem)\n        - [Architecture](#architecture)\n        - [TerminateProcess](#terminateprocess)\n        - [TerminateMessage](#terminatemessage)\n        - [SuccessExitCode](#successexitcode)\n        - [ContinueIfFail](#continueiffail)\n        - [VerifyInstall](#verifyinstall)\n        - [SkipProcessCount](#skipprocesscount)\n5. [Debugging](#debugging)\n6. [License](#license)\n7. [Additional Comments](#additional-comments)\n\n## Requirement\n\nBefore reading through this documentation, please note that a minimum of **PowerShell 2.0** is required to utilize this project. **However, PowerShell 3.0 or higher is recommended.**\n\n## Getting Started\n\nTo begin testing powerpkg:\n\n**(1)**: Clone this repository or download it as a ZIP file.\n\n**(2)**: Invoke `powerpkg.ps1`:\n```shell\npowershell.exe -NoProfile -ExecutionPolicy Unrestricted -File \"contrib\\examplepackage\\powerpkg.ps1\"\n```\n\n**(3)**: *And that's it!*\n\n\u003e **NOTE**:\n\u003e\n\u003e To discover basic usage of powerpkg, refer to the [How It Works](#how-it-works) segment of this README.\n\n## How It Works\n\n**(1)**: Save the following XML element inside a [`package.xml`](#package-file-packagexml) file alongside `powerpkg.ps1`:\n\n```xml\n\u003cPackage\u003e\n\u003c/Package\u003e\n```\n\n**(2)**: Copy the following [script configuration](#script-configuration-configuration) XML element and paste it inside the `\u003cPackage\u003e` XML element:\n\n```xml\n\u003cConfiguration\u003e\n\t\u003cPackageName\u003eExample Package\u003c/PackageName\u003e\n\t\u003cBlockHost\u003e\u003c/BlockHost\u003e\n\t\u003cSuppressNotification\u003efalse\u003c/SuppressNotification\u003e\n\u003c/Configuration\u003e\n```\n\n**(3)**: Copy the following [task entry](#task-entry-taskentry) XML element and paste it below the `\u003cConfiguration\u003e` XML element:\n\n```xml\n\u003cTaskEntry\u003e\n\t\u003cTaskName\u003eExample Task Entry\u003c/TaskName\u003e\n\t\u003cExecutable\u003epowershell.exe -NoProfile Write-Host \"Hello World!\"\u003c/Executable\u003e\n\u003c/TaskEntry\u003e\n```\n\n**(4)**: Ensure your package file (`package.xml`) appears as this example:\n\n```xml\n\u003cPackage\u003e\n\t\u003cConfiguration\u003e\n\t\t\u003cPackageName\u003eExample Package\u003c/PackageName\u003e\n\t\t\u003cBlockHost\u003e\u003c/BlockHost\u003e\n\t\t\u003cSuppressNotification\u003efalse\u003c/SuppressNotification\u003e\n\t\u003c/Configuration\u003e\n\t\u003cTaskEntry\u003e\n\t\t\u003cTaskName\u003eExample Task Entry\u003c/TaskName\u003e\n\t\t\u003cExecutable\u003epowershell.exe -NoProfile Write-Host \"Hello World!\"\u003c/Executable\u003e\n\t\u003c/TaskEntry\u003e\n\u003c/Package\u003e\n```\n\n**(5)**: Invoke `powerpkg.ps1`:\n\n```shell\npowershell.exe -NoProfile -ExecutionPolicy Unrestricted -File \"powerpkg.ps1\"\n```\n\n**(6)**: As `powerpkg.ps1` is running, you will notice output similar to the following example:\n\n```\nInitiating Package (Example Package):\n\nHost                       : examplehost1\nOperating System (Windows) : 6.3\nUserspace Architecture     : AMD64\nUser                       : misterpeguero\n\n----\n\nConfiguration Importation  : True\nSuppress Notification      : False\n\n----\n\n(1) Example Task Entry:\n[powershell.exe -NoProfile Write-Host \"Hello World!\"]\n\nHello World!\n\nOK: (0)\n\n----\n\nPackage Results (Example Package):\n\nTasks Processed : 1\n ^\n |\n |---- Success : 1\n +---- Failure : 0\n\nOK: (0)\n```\n**(7)**: *And that's it!*\n\nThe last line in the example output above (`OK: (0)`) solely reports the exit code of `powerpkg.ps1`. In this case, the zero exit code indicates a successful package deployment. Specified executables also report an exit code upon their invocation and have an influence on the exit code of `powerpkg.ps1`.\n\n\u003e **NOTE**:\n\u003e\n\u003e If `powerpkg.ps1` terminates with a non-zero exit code, determine its meaning in the [Debugging](#debugging) segment of this README.\n\u003e\n\u003e To discover in-depth usage of powerpkg, refer to the [Package File](#package-file-packagexml) segment of this README.\n\n## Package File (`package.xml`)\n\nA package file is a configuration file of `powerpkg.ps1` that consists of instructions that:\n\n  1. [Specify how `powerpkg.ps1` should behave](#script-configuration-configuration), using one `\u003cConfiguration\u003e` XML element.\n  2. [What executables to invoke and how to invoke them](#task-entry-taskentry), using one or more `\u003cTaskEntry\u003e` XML elements.\n\nAnd are typically presented in the following manner:\n\n```xml\n\u003cPackage\u003e\n\t\u003cConfiguration\u003e\n\t\t\u003cPackageName\u003e\u003c/PackageName\u003e\n\t\t\u003cBlockHost\u003e\u003c/BlockHost\u003e\n\t\t\u003cSuppressNotification\u003e\u003c/SuppressNotification\u003e\n\t\u003c/Configuration\u003e\n\t\u003cTaskEntry\u003e\n\t\t\u003cTaskName\u003e\u003c/TaskName\u003e\n\t\t\u003cExecutable\u003e\u003c/Executable\u003e\n\t\t\u003cOperatingSystem\u003e\u003c/OperatingSystem\u003e\n\t\t\u003cArchitecture\u003e\u003c/Architecture\u003e\n\t\t\u003cTerminateProcess\u003e\u003c/TerminateProcess\u003e\n\t\t\u003cTerminateMessage\u003e\u003c/TerminateMessage\u003e\n\t\t\u003cSuccessExitCode\u003e\u003c/SuccessExitCode\u003e\n\t\t\u003cContinueIfFail\u003e\u003c/ContinueIfFail\u003e\n\t\t\u003cVerifyInstall\u003e\u003c/VerifyInstall\u003e\n\t\t\u003cSkipProcessCount\u003e\u003c/SkipProcessCount\u003e\n\t\u003c/TaskEntry\u003e\n\u003c/Package\u003e\n```\n\nWhich, with a bit of customization, can become the following example:\n\n```xml\n\u003cPackage\u003e\n\t\u003cConfiguration\u003e\n\t\t\u003cPackageName\u003eExample Package\u003c/PackageName\u003e\n\t\t\u003cBlockHost\u003eexamplehost1,examplehost2\u003c/BlockHost\u003e\n\t\t\u003cSuppressNotification\u003efalse\u003c/SuppressNotification\u003e\n\t\u003c/Configuration\u003e\n\t\u003cTaskEntry\u003e\n\t\t\u003cTaskName\u003eExample Task Entry\u003c/TaskName\u003e\n\t\t\u003cExecutable\u003epowershell.exe -NoProfile Write-Host \"Hello World!\"\u003c/Executable\u003e\n\t\t\u003cOperatingSystem\u003e6.1\u003c/OperatingSystem\u003e\n\t\t\u003cArchitecture\u003eAMD64\u003c/Architecture\u003e\n\t\t\u003cTerminateProcess\u003eexampleprocess\u003c/TerminateProcess\u003e\n\t\t\u003cTerminateMessage\u003eExample Program will terminate. Press OK to continue.\u003c/TerminateMessage\u003e\n\t\t\u003cSuccessExitCode\u003e1234\u003c/SuccessExitCode\u003e\n\t\t\u003cContinueIfFail\u003etrue\u003c/ContinueIfFail\u003e\n\t\t\u003cVerifyInstall\u003e[Program]Example Program\u003c/VerifyInstall\u003e\n\t\t\u003cSkipProcessCount\u003efalse\u003c/SkipProcessCount\u003e\n\t\u003c/TaskEntry\u003e\n\t\u003cTaskEntry\u003e\n\t\t\u003cTaskName\u003eAnother Example Task Entry\u003c/TaskName\u003e\n\t\t\u003cExecutable\u003epowershell.exe -NoProfile Write-Host \"Hello New England!\"\u003c/Executable\u003e\n\t\u003c/TaskEntry\u003e\n\t\u003cTaskEntry\u003e\n\t\t\u003cTaskName\u003eYet Another Example Task Entry\u003c/TaskName\u003e\n\t\t\u003cExecutable\u003emsiexec.exe /i \"[Package]example_program.msi\" /qn /norestart\u003c/Executable\u003e\n\t\t\u003cVerifyInstall\u003e[Program]Example Program\u003c/VerifyInstall\u003e\n\t\u003c/TaskEntry\u003e\n\u003c/Package\u003e\n```\n\nTo further familiarize yourself with powerpkg (and especially the above examples), continue reading the [Script Configuration](#script-configuration-configuration) and [Task Entry](#task-entry-taskentry) segments of this README. Examining the contents of the `\\contrib\\examplepackage` directory is also encouraged.\n\n### Script Configuration (`\u003cConfiguration\u003e`)\n\nThe `\u003cConfiguration\u003e` XML element allows for specifying how `powerpkg.ps1` should behave. If `\u003cConfiguration\u003e` is nonexistent or no values are specified within `package.xml`, the default values for the parameters mentioned below are used.\n\n`\u003cConfiguration\u003e` should be specified only once within `package.xml`.\n\n#### `PackageName`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: Allows for specifying a custom name for a package.\n\u003e - **Default Value**: The name of the package directory.\n\u003e - **Example Value**:\n\u003e\n\u003e ```xml\n\u003e \u003cPackageName\u003eExample Package\u003c/PackageName\u003e\n\u003e ```\n\n#### `BlockHost`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: Prevents specified hosts from processing a package.\n\u003e - **Default Value**: `null`\n\u003e - **Example Value**:\n\u003e\n\u003e ```xml\n\u003e \u003cBlockHost\u003eexamplehost1\u003c/BlockHost\u003e\n\u003e\n\u003e \u003cBlockHost\u003eexamplehost1,examplehost2\u003c/BlockHost\u003e\n\u003e ```\n\u003e\n\u003e **NOTE**:\n\u003e\n\u003e A range of hosts can also be blocked, as well. If you have a set machines whose **first** several characters are identical, such as the following example:\n\u003e\n\u003e ```\n\u003e ABCDE1111\n\u003e ABCDE2222\n\u003e ABCDE3333\n\u003e ABCDE4444\n\u003e ABCDE5555\n\u003e ```\n\u003e\n\u003e You can block the list of machines mentioned above by specifying the following:\n\u003e\n\u003e ```xml\n\u003e \u003cBlockHost\u003eABCDE\u003c/BlockHost\u003e\n\u003e ```\n\n#### `SuppressNotification`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: Prevents a balloon notification from displaying upon a successful deployment.\n\u003e - **Default Value**: `true`\n\u003e - **Example Value**:\n\u003e\n\u003e ```xml\n\u003e \u003cSuppressNotification\u003etrue\u003c/SuppressNotification\u003e\n\u003e\n\u003e \u003cSuppressNotification\u003efalse\u003c/SuppressNotification\u003e\n\u003e ```\n\n### Task Entry (`\u003cTaskEntry\u003e`)\n\nThe `\u003cTaskEntry\u003e` XML element allows for specifying what executables to invoke and how to invoke them.\n\nBecause of its purpose, `\u003cTaskEntry\u003e` can also be specified more than once within `package.xml`.\n\n#### `TaskName`\n\n\u003e - **Required**: Yes\n\u003e - **Purpose**: The title for an individual task entry.\n\n```xml\n\u003cTaskName\u003eInstall Program\u003c/TaskName\u003e\n```\n\n\u003e **NOTE**:\n\u003e\n\u003e You can temporarily skip task entries for the sole purpose of debugging and testing packages, by specifying `#` as the first character in this fashion:\n\u003e\n\u003e ```xml\n\u003e \u003cTaskName\u003e#Install Program\u003c/TaskName\u003e\n\u003e ```\n\n#### `Executable`\n\n\u003e - **Required**: Yes\n\u003e - **Purpose**: An executable file/path to invoke.\n\u003e - **Subparamaters**:\n\u003e\n\u003e Subparameter | Description\n\u003e ------------ | -----------\n\u003e `[Package]`  | Allows for specifying a file or directory located within a package directory.\n\n\u003e **NOTE**:\n\u003e\n\u003e Before calling `powershell.exe`, ensure to specify the `-NoProfile` parameter (`powershell.exe -NoProfile Example-Command`), to minimize the risk of arbitrary code execution.\n\n##### Whitespace and Quotation Marks\n\nWhen specifying an executable path or arguments containing whitespace, it is recommended to surround such text with double quotation marks.\n\nFor individual file and/or directory names containing whitespace, such items should be surrounded by **single** quotation marks. However, note that this tip solely applies to arguments, and not executable paths themselves.\n\nExample: `powershell.exe \"[Package]'an example.ps1'\"` or `\"C:\\White Space\\example.exe\" /argument \"D:\\'More White Space'\\Directory\"`\n\nIt is also recommended to always surround files and/or directories specified with the `[Package]` parameter with double quotation marks, to prevent I/O exceptions from being thrown with the usage of whitespace within the directory path of a package directory.\n\n##### Environment Variables\n\nUnfortunately, at this time, powerpkg does not support the independent usage of environment variables. However, as a workaround, you can:\n\n- Call `cmd.exe` in the following manner: `cmd.exe /c notepad.exe %SYSTEMDRIVE%\\test.txt`.\n- Call `powershell.exe` in the following manner: `powershell.exe Start-Process -FileName notepad.exe -ArgumentList $env:SYSTEMDRIVE\\test.txt -Wait`.\n\n##### Examples\n\nHere are other valid example use cases of the `Executable` parameter:\n\n```xml\n\u003cExecutable\u003eipconfig.exe\u003c/Executable\u003e\n\n\u003cExecutable\u003emsiexec.exe /i \"[Package]example.msi\" /qn /norestart\u003c/Executable\u003e\n\n\u003cExecutable\u003ecmd.exe /q /c \"[Package]example.bat\"\u003c/Executable\u003e\n\n\u003cExecutable\u003e\"[Package]example.exe\"\u003c/Executable\u003e\n\n\u003cExecutable\u003e\"[Package]example_directory\\'example file with whitespace.exe'\"\u003c/Executable\u003e\n```\n\n#### `OperatingSystem`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: The operating system a task entry should be processed under.\n\nWhen utilizing this parameter, you will want to specify the NT kernel version number of a specific Windows operating system:\n\nWindows Operating System | NT Kernel Version\n------------------------ | -----------------\n10                       | `10.0`\n8.1                      | `6.3`\n8                        | `6.2`\n7                        | `6.1`\nVista                    | `6.0`\n\nAnd specify a NT kernel version number in this fashion:\n\n```xml\n\u003cOperatingSystem\u003e6.3\u003c/OperatingSystem\u003e\n```\n\n\u003e **NOTE**:\n\u003e\n\u003e Because the `OperatingSystem` parameter determines to find a match between a specified value (`6.1`) and the complete version number of a Windows operating system (`6.1.7601`), the value of `6.1.7601`, which indicates a specific build of Windows 7, can be specified, as well.\n\n#### `Architecture`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: The userspace architecture a task entry should be processed under.\n\nFor executable invocations that depend on a specific architectural environment, you will want to specify the following for:\n\n**AMD64** (x64 in Microsoft terminology) environments:\n\n```xml\n\u003cArchitecture\u003eAMD64\u003c/Architecture\u003e\n```\n\n**x86** environments:\n\n```xml\n\u003cArchitecture\u003ex86\u003c/Architecture\u003e\n```\n\n#### `TerminateProcess`\n\n\u003e - **Required**: No, except when utilizing the `TerminateMessage` parameter.\n\u003e - **Purpose**: A process, or list of process, to terminate prior to executable invocation.\n\n```xml\n\u003cTerminateProcess\u003eexplorer\u003c/TerminateProcess\u003e\n\n\u003cTerminateProcess\u003eexplorer,notepad\u003c/TerminateProcess\u003e\n```\n\n#### `TerminateMessage`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: A message to display to an end-user prior to the termination of processes. Used in conjunction with the `TerminateProcess` parameter.\n\n```xml\n\u003cTerminateMessage\u003eFile Explorer will terminate. When prepared, click on the OK button.\u003c/TerminateMessage\u003e\n```\n\n#### `SuccessExitCode`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: Non-zero exit codes that also determine a successful task entry.\n\n\u003e **NOTE**:\n\u003e\n\u003e The `0` exit code is automatically applied to any specified value, regardless as to whether or not it is explicitly specified.\n\n```xml\n\u003cSuccessExitCode\u003e10\u003c/SuccessExitCode\u003e\n\n\u003cSuccessExitCode\u003e10,777,1000\u003c/SuccessExitCode\u003e\n```\n\n#### `ContinueIfFail`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: Specify as to whether or not to continue with remaining task entires if a specific task entry fails.\n\nWhen explicitly utilizing the `ContinueIfFail` parameter and specifying the following value:\n\nValue             | Result\n-----             | ------\n`true`            | `powerpkg.ps1` will continue processing remaining task entires. A task entry set to continue when resulting in a non-zero exit code will not alter the exit code of `powerpkg.ps1`.\n`false` (Default) | `powerpkg.ps1` will fail and result in a non-zero exit code.\n\nAnd specify your desired value in this fashion:\n\n```xml\n\u003cContinueIfFail\u003etrue\u003c/ContinueIfFail\u003e\n```\n\n#### `VerifyInstall`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: Skip a task entry if a program, hotfix, file/directory path, or a specific version of an executable file exist.\n\u003e - **Subparamaters**:\n\u003e\n\u003e Subparameter     | Description                                                        | Additional Arguments | Additional Arguments Required?\n\u003e ------------     | -----------                                                        | -------------------- | ------------------------------\n\u003e `[Hotfix]`       | Verify the existence of a hotfix.                                  |                      |\n\u003e `[Path]`         | Verify the existence of a file or directory path.                  |                      |\n\u003e `[Vers_File]`    | Verify the file version of an executable file.                     | `[Build:]`           | Yes\n\u003e `[Vers_Product]` | Verify the product version of an executable file.                  | `[Build:]`           | Yes\n\u003e `[Program]`      | Verify the existence of an installed program name or product code. | `[Build:]`           | No\n\n\u003e **NOTE**:\n\u003e\n\u003e When utilizing the `VerifyInstall` parameter, you **must** specify one of the following subparamaters mentioned above.\n\u003e\n\u003e The usage of PowerShell environment variables, such as `$env:SYSTEMDRIVE`, is supported by the `VerifyInstall` parameter.\n\u003e\n\u003e The usage of quotation marks is not a requirement, even for paths that contain whitespace.\n\n##### [Build:] Argument\n\nAs you may have noticed, certain parameters take advantage of a **`[Build:]`** argument, which allows you to verify the existence of a specific version number associated with an installed program or executable file. To use this argument, you must specify it at the right side of a provided `VerifyInstall` value, then insert a version number on the right side of its colon. Take the following as an example:\n\n```xml\n\u003cVerifyInstall\u003e[Vers_Product]C:\\example_file.exe[Build:1.0]\u003c/VerifyInstall\u003e\n```\n\nHowever, unlike the `OperatingSystem` parameter, whatever `[Build:]` version number is specified must be identical to the version number of an installed program or executable file.\n\n##### [Vers_] Subparameters\n\nTo utilize the **`[Vers_*]`** subparameters, you will need to retrieve the file or product version numbers from an executable file. To do so:\n\n  - Within PowerShell, invoke the following command:\n\n    ```powershell\n    [System.Diagnostics.FileVersionInfo]::GetVersionInfo(\"C:\\example_file.exe\") | Select FileVersion, ProductVersion\n    ```\n\n  - And you will notice the following output:\n\n    ```\n    FileVersion       ProductVersion\n    -----------       --------------\n    1.0               1.0\n    ```\n\n  - Then, specify either outputted value inside the `[Build:]` argument in the following manner:\n\n    ```xml\n    \u003cVerifyInstall\u003e[Vers_File]C:\\example_file.exe[Build:1.0]\u003c/VerifyInstall\u003e\n\n    \u003cVerifyInstall\u003e[Vers_File]$env:SYSTEMDRIVE\\example_file.exe[Build:1.0]\u003c/VerifyInstall\u003e\n\n    \u003cVerifyInstall\u003e[Vers_Product]C:\\example_file.exe[Build:1.0]\u003c/VerifyInstall\u003e\n    ```\n\n##### [Program] Subparameter\n\nTo utilize the **`[Program]`** subparameter, you can verify the existence of a:\n\n- **Product Code**:\n\n  - Open the `Programs and Features` applet of the Windows Control Panel, and retrieve the name of the installed program you wish to verify the existence of:\n\n    ![Programs and Features](/img/example_verifyinstall_program.gif)\n\n  - Within PowerShell, enter the following command:\n\n    ```powershell\n    Get-ChildItem HKLM:\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall | % {Get-ItemProperty $_.PSPath} | ? {$_.DisplayName -eq \"Example Program\"} | Select PSChildName\n    ```\n\n  - Within PowerShell, enter the following command, if you're utilizing a x86 program on an AMD64 system:\n\n    ```powershell\n    Get-ChildItem HKLM:\\Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall | % {Get-ItemProperty $_.PSPath} | ? {$_.DisplayName -eq \"Example Program\"} | Select PSChildName\n    ```\n\n  - And you will notice the following output:\n\n    ```\n    PSChildName\n    -----------\n    {00000000-0000-0000-0000-000000000000}\n    ```\n\n  - Then, specify the outputted value in this fashion:\n\n    ```xml\n    \u003cVerifyInstall\u003e[Program]{00000000-0000-0000-0000-000000000000}\u003c/VerifyInstall\u003e\n    ```\n\n  - Or if you wish to verify the existence an installed program's respective version number along with its product code:\n\n    ```xml\n    \u003cVerifyInstall\u003e[Program]{00000000-0000-0000-0000-000000000000}[Build:1.0]\u003c/VerifyInstall\u003e\n    ```\n\n- **Program Name**:\n\n  - Open the `Programs and Features` applet of the Windows Control Panel, and retrieve the name of the installed program you wish to verify the existence of:\n\n    ![Programs and Features](/img/example_verifyinstall_program.gif)\n\n  - Then, specify a program name in this fashion:\n\n    ```xml\n    \u003cVerifyInstall\u003e[Program]Example Program\u003c/VerifyInstall\u003e\n    ```\n\n  - Or if you wish to verify the existence an installed program's respective version number along with its name:\n\n    ```xml\n    \u003cVerifyInstall\u003e[Program]Example Program[Build:1.0]\u003c/VerifyInstall\u003e\n    ```\n\n##### Examples\n\nHere are other valid example use cases of the `VerifyInstall` parameter and its respective subparameters:\n\n```xml\n\u003cVerifyInstall\u003e[Hotfix]KB0000000\u003c/VerifyInstall\u003e\n\n\u003cVerifyInstall\u003e[Path]C:\\example_file.exe\u003c/VerifyInstall\u003e\n\n\u003cVerifyInstall\u003e[Path]C:\\example_directory\u003c/VerifyInstall\u003e\n\n\u003cVerifyInstall\u003e[Path]C:\\example directory with whitespace\u003c/VerifyInstall\u003e\n\n\u003cVerifyInstall\u003e[Path]$env:SYSTEMDRIVE\\example_directory\u003c/VerifyInstall\u003e\n\n\u003cVerifyInstall\u003e[Path]HKLM:\\registry_path\u003c/VerifyInstall\u003e\n\n\u003cVerifyInstall\u003e[Path]env:\\ENVIRONMENT_VARIABLE\u003c/VerifyInstall\u003e\n```\n\n#### `SkipProcessCount`\n\n\u003e - **Required**: No\n\u003e - **Purpose**: Specify as to whether or not a processed task entry should be counted as such and contribute to the overall total of processed task entries, whether it succeeds or fails.\n\nWhen explicitly utilizing the `SkipProcessCount` parameter and specifying the following value:\n\nValue             | Result\n-----             | ------\n`true`            | `powerpkg.ps1` will not count a processed task entry as such.\n`false` (Default) | `powerpkg.ps1` will count a processed task entry as such.\n\nAnd specify your desired value in this fashion:\n\n```xml\n\u003cSkipProcessCount\u003etrue\u003c/SkipProcessCount\u003e\n```\n\n## Debugging\n\n### Exit Codes\n\nCode | Description\n---- | -----------\n1    | A task entry terminated with a non-zero exit code.\n2    | An exception rose from a task entry during its executable invocation process.\n3    | Initial task entry processing failed.\n4    | A host has been prevented from processing a package.\n5    | A package file was not found.\n6    | No task entries were processed.\n7    | A task entry is missing a required value.\n\n## License\n\npowerpkg is licensed under the MIT license. For more information regarding this license, refer to the `LICENSE` file located at the root of this repository.\n\n## Additional Comments\n\n```\n ________  ________  ___       __   _______   ________  ________  ___  __    ________\n|\\   __  \\|\\   __  \\|\\  \\     |\\  \\|\\  ___ \\ |\\   __  \\|\\   __  \\|\\  \\|\\  \\ |\\   ____\\\n\\ \\  \\|\\  \\ \\  \\|\\  \\ \\  \\    \\ \\  \\ \\   __/|\\ \\  \\|\\  \\ \\  \\|\\  \\ \\  \\/  /|\\ \\  \\___|\n \\ \\   ____\\ \\  \\\\\\  \\ \\  \\  __\\ \\  \\ \\  \\_|/_\\ \\   _  _\\ \\   ____\\ \\   ___  \\ \\  \\  ___  \n  \\ \\  \\___|\\ \\  \\\\\\  \\ \\  \\|\\__\\_\\  \\ \\  \\_|\\ \\ \\  \\\\  \\\\ \\  \\___|\\ \\  \\\\ \\  \\ \\  \\|\\  \\\n   \\ \\__\\    \\ \\_______\\ \\____________\\ \\_______\\ \\__\\\\ _\\\\ \\__\\    \\ \\__\\\\ \\__\\ \\_______\\\n    \\|__|     \\|_______|\\|____________|\\|_______|\\|__|\\|__|\\|__|     \\|__| \\|__|\\|_______|\n```\n\nFellow PowerShell enthusiasts, this is my contribution to the community. I hope you take advantage of this project I have worked very hard on. You guys rock!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstutstev%2Fpowerpkg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstutstev%2Fpowerpkg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstutstev%2Fpowerpkg/lists"}