Login Script clean up

Recently discovered I had an issue with my Global Address Book on Exchange not being able to update Offline Address Books across the company. this is prompted me to dig out an old project that I never really got working. I want to build a VB Script that when a user logs in that it cleans up their profile of temp files and deletes the OAB files. The trick I have run into is that I have a mixed enviroment of XP and 7 and I am not that strong in VB Scripting. I plan on incorporating the script into my login script which I have attached. Any help is much appreciated.

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

I tested the deleteTempFileswithOAB.vbs and get error line 125. I did further testing with the original script and found a bit of an issue but luckily i had the user's Outlook files backed up. It deleted the archive.pst file in the outlook directory in the user's profile. The other unfortunate side effect that I didn't account for is user's with large mailboxes. His mailbox took close to 20 minutes to sync in which time Outlook was unbearably slow.

With the original cleanup script I also found that it is not cleaning out the Temporary Internet files in the profile. I went to the directory and there was still quite a bit of stuff in it.

I was wandering in the interest of simplifying if we could do separate scripts for each goal we are trying to achieve. Separate scripts for Temp files, Temp Internet Files, OAB files. I look at the script and to be honest I partially understand what it is doing but it is still a bit over my head. Maybe by splitting them up I will understand it better. i am trying to learn VBS so that I can do this on my own at some point.