Jump to content

Reading INI With Possible Multiple Data


Go to solution Solved by jguinch,

Recommended Posts

I'm trying to build a printer installed and really don't know how to go about doing it the best way... here's my scenario

Computer names on the domain give the school campus location and a room number that I am able to parse

Computer names that match 001117 have two printers that need to be installed on them, currently I am trying to do this through an INI file

[Printers]

001117=ServerPrinter01

001117=ServerPrinter02

I'm able to pick up the first printer but on the second, my question is how can I read the entire INI file to identify all the matches of 001117?

Computer Labs could have up to 4 different printers that require installation

Thank you in advance for your help!

Link to comment
Share on other sites

  • Solution

You can use a separator and put the list of printers in the same line :

[Printers]
001117=\\Server\Printer01;\\Server\Printer02

Now, you just have to split the string (with StringSplit for example...)

Link to comment
Share on other sites

You can use a separator and put the list of printers in the same line :

[Printers]
001117=\\Server\Printer01;\\Server\Printer02

Now, you just have to split the string (with StringSplit for example...)

Genuis! So simple... thank you so much for your quick response and accurate help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...