Now, anyone that has read through the reads I've made should know, I am particallys braindead when it comes to these languages. I can code in PHP, integrating MySQL databases, JavaScript, CSS, AJAX, and so much else without batting an eye, but simple batch and VBScript is murder.
So, hopefully this one is relatively easy, compared to my last major project (the profile rebuild script).
Basically, since noone could figure out why we could get the "Documents" directory to copy, no matter what, they basically told me not to bother wasting more time on it and that they would submit it for approval with a note that agents would still have to remote into machine for that one directory. Now, I'm going through our hundreds of "fixes" and fixing them. Many use sloppy commands and execution methods, and even more don't take into account that our Win7 machines do not have partitioned drives like the XP machines do.
Well, this current fix is kicking my butt, mainly because I don't understand these web documents from 1992 explaining how to use arrays in batches. So, simply put, the script pulls two pieces of information from the target computers FQMN. The first piece will determine the order of some DNS suffixes. That second piece is the problem. I get it, no sweat, but I can't use that piece as it is. Instead, I need to compare it to a master list to determine what is needed for the script to run.
Yeah, vague, sorry, network-related complications with providing details.
Basic concept, I have several lists, the longest being 1,796 possibilities. Basically, if any of those that second piece of information retrieved from the FQMN is one of those 1,796 then I need to set a third variable to 1. If that second piece is from one of the another list, the third variable is 2, etc.
Now, I know I can test the second piece of information individually to determine that third variable, but considering that there's 1,796 possibilities of it being 1, I'd rather not have to make 1,796 if statements.
Let me know if that was too confusing and I'll try to be clearer. :S