Set-regkey only when Installation is succesfull

//Set-regkey only when Installation is succesfull
Set-regkey only when Installation is succesfull 2017-11-23T15:16:08+00:00

The Toolkit Forums Deployment Scripts Set-regkey only when Installation is succesfull

  • Author
    Posts
  • Rolies
    Participant
    Post count: 1
    #2437 |

    Dear,

    We want to have a registry key populated with the names of all installations coming from packages.
    Is there not an easy way to check if an installation succeeds and then use SET-REGKEY to add a package specific reg-key?
    As we use the toolkit the name of the .msi is adapted to have the full package name in the logfile so it even should be possible to have all this added to the ZERO CONFIG MSI installations

    If I use the SET-Regkey under Post installation it always executes even if the .msi is not installed.

    Kind Regards

  • Jim
    Participant
    Post count: 45

    If (Get-InstalledApplication -Name NewApplication) {
    Set-RegistryKey -Key RegPathHere -Name 'RegNameHere' -Value RegValueHere
    }

You must be logged in to reply to this topic.