How to work on PoP Up window which comes up while uninstall of the application

Welcome Forums General PowerShell Q&A How to work on PoP Up window which comes up while uninstall of the application

This topic contains 3 replies, has 4 voices, and was last updated by

 
Participant
3 years, 3 months ago.

  • Author
    Posts
  • #29415

    Participant
    Points: 0
    Rank: Member

    Hi Team,

    When i am trying to uninstall notepad++ using powershell, I am getting an popup to confirm from the user. How can i confirm via code so that notepad++ gets uninstalled automatically.

    Thanks,
    Chethan

  • #29416

    Participant
    Points: 0
    Rank: Member

    Are you using the /S switch for the silent unattended uninstall?

    In the future, please post the relevant portion of your script as opposed to making us guess what you might have done.

  • #29418

    Keymaster
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    PowerShell isn't really designed for GUI interaction. As suggested, try a silent uninstall.

  • #31842

    Participant
    Points: 0
    Rank: Member

    I am using following script to uninstall Lync,

    Set-ExecutionPolicy Unrestricted -Force
    $programs = @("Microsoft Lync Server 2013, Core Components")
    foreach ($program in $programs){
    try{
    $app = Get-WmiObject -Class win32_Product -ComputerName "localhost" | Where-Object {$_.Name -match "$program"}
    if ($app -ne $null){
    $app.Uninstall()
    Write-Host -ForegroundColor DarkYellow "$program has been uninstalled successsfully."
    }else{
    Write-Host -ForegroundColor DarkYellow "$program could not be found."
    }
    }catch [exception]{
    Write-Host '$_ is' $_
    Write-Host '$_.GetType().FullName is' $_.GetType().FullName
    }
    }

    but could not figure out how can I make it silent uninstall that would return value 0 instead of 1603

The topic ‘How to work on PoP Up window which comes up while uninstall of the application’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort