Questions

Windows Scripting (or other method) to perform file delete & replacement

+
0 Votes
Locked

Windows Scripting (or other method) to perform file delete & replacement

MetalFR0
I have a crappy software package that I'm forced to run on my network for scheduling until the Board of Directors will approve MS Exchange. In the meantime, whenever we do upgrades, invariably we have issues & the local client database where stuff is stored to make network operations faster has to be deleted & replaced/repopulated often. The frequency with which I'm seeing updates now is frightening, & manually doing all that work is too much a chore for me for the # of users I am managing. Also, even w/ detailed instructions, only about half the users have the aptitude and/or patience to do the deed themselves.

That said, I need to find a faster way to search for & replace a specific file. Basically, the app installs a "documents and settings" copy of itself & it's local client DB underneath each user profile. We have several multi-user PCs that run this software for several users (4 PCs in our front office that 6-7 users share & all need to run this software). Basically, we have c:\documents and settings\<username>\application data\<app name>\clientdb.mdb that needs to be deleted, & replaced with a fresh, blank copy in the "reservedb" folder underneath the <app name> folder.

My problem is, it's complex because I need it to run on login or after login to try to clean-up the old DB before the user launches the software, and because there's no telling how many copies of the software are loaded on each machine (again, in the "documents and settings" folder), and I need to automate the replacement of each instance of the deleted file w/ a fresh copy of the reserve DB file (preferably from the folder w/in their own user profile because permissions will already be set).

I realize this is a bit of a tall order & I may be asking a lot here, but I'm at my wit's end, & until I can convince the suits to spend the money on MS Exchange, I have to live w/ this wretched software. Any help would be greatly appreciated.