Batch file Conditionals

    Date: 11/13/06 (IT Professionals)    Keywords: security

    Alright, so unlike my last question to this group, I doubt this question will illicit such an overwhelming number of responses (thank you for all your help with the security stuff, by the way), but I still have to ask.

    I want to create a batch file that will a) check to see if an update (located in a central directory on a server) has been installed, and if it hasn't, b) install the file. At the very least, every one of the machines this batch file will be run on has SP1. They were all imaged that way. Unfortunately the machines weren't updated (EVER) in the last year or two or so due to worries about certain programs we have not working on SP2 (yet the people who had this job before me never ran any tests to see if it would work. Whatever), which has been since been resolved.

    So, I'm trying to run over a year's worth of updates on these machines, a daunting task to say the least. The time I have to do this is extreemly limited to the early morning hours of Monday (ugh), so I don't exactly have all the time in the world to download excessively huge updates, like Service Packs.

    Now, I've never scripted a batch file before, so I'm extreemly noobish at this.

    Now, the batch file will have the server path to the files and not the mapped drive path (these computers wouldn't have that particular drive mapped anyway, although they do have access to it), so that's step one right there. I am also checking to see if the $NtUninstall folder on the local machine for the corresponding ID number has been created (thus telling me that the update has been installed), and if the folder exists, the file is skipped. That's not the problem (yet. I'm sure I'll run into problems when I try and run this. lol!).

    The problem is checking to see if Service Packs have been installed (for both Windows and Office), because those KB numbers don't show up as the standard $NtUninstall folders.nd the installation of Service Packs takes up all my time, hence why I want to

    It looks like there is 1 $NtServicePackUninstall$ folder, but that doesn't give me any way to distinguish between SP1 and SP2. I also see no folder for the Office Service Packs.

    Any help figuring out what to put in my conditional statements would be greatly appreciated.

    P.S. I'm sorry if this seems a bit disjointed, I'm doing 10 different things at once here. LOL!

    Will be cross posted all over the place.

    Source: http://community.livejournal.com/itprofessionals/47172.html

« Graphic Designer || Does anyone here know how to »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home