Result of custom installation

//Result of custom installation
Result of custom installation 2017-12-18T21:20:46+00:00

The Toolkit Forums General Result of custom installation

  • Author
    Posts
  • Stefan
    Participant
    Post count: 4

    Hello,

    I am doing the first steps with the toolkit.
    I have created some packages, which install a msi or exe.

    The commands “Execute-MSI” and “Execute-Process” seem to take care, if the installation was ok or not.
    What about this simple example:

    <code>$FeatureInstallResult = Install-WindowsFeature -Name Telnet-Client
    
    IF ( $FeatureInstallResult.Success -eq $True ) {            
        # Success
    } ELSE {            
        # Error
    }</code>

    How do I report back to the toolkit, if my custom Installation was successful or not?

    Thank you

    • This topic was modified 6 months, 1 week ago by  Stefan.
  • Stefan
    Participant
    Post count: 4

    Would it be correct like this?

    <code>$FeatureInstallResult = Install-WindowsFeature -Name Telnet-Client
    
    IF ( $FeatureInstallResult.Success -eq $True ) {            
        [int32]$mainExitCode = 0
    } ELSE {            
        [int32]$mainExitCode = 1
    }</code>

You must be logged in to reply to this topic.