Popup message occurs when value is correct

Welcome Forums General PowerShell Q&A Popup message occurs when value is correct

  • This topic has 2 replies, 2 voices, and was last updated 1 year ago by
    Participant
    .
Viewing 1 reply thread
  • Author
    Posts
    • #178095
      Participant
      Topics: 7
      Replies: 9
      Points: 102
      Rank: Participant

      The value from the .ini file does return correctly as shown in blue below. What I cannot figure out is why my message box is still popping up when the value IS Fujitsu fi-71* or 72*…I only want it to do so when the value selected and set in the .ini file is neither of the supported options.

      $Value = Get-Content -Path C:\ProgramData\Kofax\Vrs\kofax200.ini | Where-Object { $_ -match ‘DefaultSource32’ }
      $Value.Split(‘=’)[1]

      If ($Value -notlike “Fujitsu fi-71*” -or “Fujitsu fi-72*”){
      $wshell = New-Object -ComObject Wscript.Shell
      $Output = $wshell.Popup(“Model selection unsupported. Please re-open utility and choose Fujitsu 7160 or 7260”)
      }
      Fujitsu fi-7160 with SVRS with AIPE

    • #178101
      Participant
      Topics: 7
      Replies: 2458
      Points: 6,439
      Helping Hand
      Rank: Community MVP

      Your condition is wrong … should be something like this:

      • #178107
        Participant
        Topics: 7
        Replies: 9
        Points: 102
        Rank: Participant

        Thank you, Olaf. I greatly appreciate your help!

Viewing 1 reply thread
  • The topic ‘Popup message occurs when value is correct’ is closed to new replies.