Reading specific .ini key change

Welcome Forums General PowerShell Q&A Reading specific .ini key change

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

      Hello, I’m having a hard time understanding how to read an .ini file change prior to my If/ Elseif/Else.
      Previously, I read the value that changed from the Registry – no problem. (shown below)
      Now the software no longer writes the default source there. Instead the vendor decided to include it in an .ini file.
      Can someone please show me what I need to add in order to pick up the Key value?

      One of the lines in Section “Defaults” is DefaultSource32. This can only be set as one item, but there are many options. I’m only running my IF statement when this changes from Software Import to Fujitsu fi-7160 or Fujitsu fi-7260.

      .ini file
      DefaultSource32=Software Import

      Here’s my previous script.

      Thank you!

    • #174802
      Senior Moderator
      Topics: 9
      Replies: 1309
      Points: 4,783
      Helping Hand
      Rank: Community Hero

      You can use below link to get some help. It has a function to convert from ini.

      Managing INI Files with PowerShell

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

      Thanks, kvprasoon.

      I did some digging around and ultimately tested this. It works and returns exactly what I need.

      Thanks again!
Viewing 2 reply threads
  • The topic ‘Reading specific .ini key change’ is closed to new replies.