Jump to content

jxtemp

Members
  • Posts

    1
  • Joined

  • Last visited

About jxtemp

  • Rank
    Newbie
    Newbie

Profile Information

  • Location
    China
  1. I want use 'run command' tast to install the.exe program. currently, only simple commands can be executed. How do I run powershell commands that include conditions and have multiple quotes like the following? thanks. "$installed = $null $Application = "ABC" $installed = Get-WMIObject -Query "SELECT * FROM Win32_Product Where Vendor Like '%$Application%'" if(!$installed) { $Arguments = @( "AP_ID=7eXXXe-XXXxx" "/install" "/quiet" "/norestart" ) Start-Process "./ABC.exe" -ArgumentList $Arguments -Wait -NoNewWindow Write-Host "$Application was Installed Successfully" } else{ Write-Host "$Application Already Installed: $installed" }"
×
×
  • Create New...