~speguero/powerpkg

31c4623cb3645a8e9d107363bffb536e40707931 — Steven Peguero 6 years ago 068e89e
Fix README VerifyInstall indentation issue
1 files changed, 12 insertions(+), 0 deletions(-)

M README.md
M README.md => README.md +12 -0
@@ 479,11 479,13 @@ However, unlike the `OperatingSystem` parameter, whatever `[Build:]` version num
To utilize the **`[Vers_*]`** subparameters, you will need to retrieve the file or product version numbers from an executable file. To do so:

  - Within PowerShell, invoke the following command:

    ```powershell
    [System.Diagnostics.FileVersionInfo]::GetVersionInfo("C:\example_file.exe") | Select FileVersion, ProductVersion
    ```

  - And you will notice the following output:

    ```
    FileVersion       ProductVersion
    -----------       --------------


@@ 491,6 493,7 @@ To utilize the **`[Vers_*]`** subparameters, you will need to retrieve the file 
    ```

  - Then, specify either outputted value inside the `[Build:]` argument in the following manner:

    ```xml
    <VerifyInstall>[Vers_File]C:\example_file.exe[Build:1.0]</VerifyInstall>



@@ 505,19 508,23 @@ To utilize the **`[Program]`** subparameter, you can verify the existence of a:

- **Product Code**:
  - 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:

    ![Programs and Features](/readme/example_verifyinstall_program.gif)

  - Within PowerShell, enter the following command:

    ```powershell
    Get-ChildItem HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall | % {Get-ItemProperty $_.PSPath} | ? {$_.DisplayName -eq "Example Program"} | Select PSChildName
    ```

  - Within PowerShell, enter the following command, if you're utilizing a x86 program on an AMD64 system:

    ```powershell
    Get-ChildItem HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | % {Get-ItemProperty $_.PSPath} | ? {$_.DisplayName -eq "Example Program"} | Select PSChildName
    ```

  - And you will notice the following output:

    ```
    PSChildName
    -----------


@@ 525,25 532,30 @@ To utilize the **`[Program]`** subparameter, you can verify the existence of a:
    ```

  - Then, specify the outputted value in this fashion:

    ```xml
    <VerifyInstall>[Program]{00000000-0000-0000-0000-000000000000}</VerifyInstall>
    ```

  - Or if you wish to verify the existence an installed program's respective version number along with its product code:

    ```xml
    <VerifyInstall>[Program]{00000000-0000-0000-0000-000000000000}[Build:1.0]</VerifyInstall>
    ```

- **Program Name**:
  - 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:

    ![Programs and Features](/readme/example_verifyinstall_program.gif)

  - Then, specify a program name in this fashion:

    ```xml
    <VerifyInstall>[Program]Example Program</VerifyInstall>
    ```

  - Or if you wish to verify the existence an installed program's respective version number along with its name:

    ```xml
    <VerifyInstall>[Program]Example Program[Build:1.0]</VerifyInstall>
    ```