1.

Solve : Find and Replace & File In Use?

Answer»

Hello... Here is my problem and my SOLUTION which I am having some problems with in a batch file on WINDOWS 2000 and XP platforms.

Problem that I wrote the batch to fix: Users need to run software in local Admin mode such as Pagemaker etc, and as Admins the users tend to download and install junk like weather bug, Limewire, and Chat software like AIM etc since you can not designate Admin privileges for one piece of software and User Privileges for rest etc.

Solution: I wrote a batch that finds and replaces the EXE's for these programs on all systems on the network as a scheduled task and replaces the EXE with a same named EXE, but one that blats to the user and alerts me to an installation of unapproved softare.

Solution Problem: If the service is started such as AIM, the service has to be stopped VIA net stop, before the EXE can be replaced. Some programs even though you shut off the service, you will get an error during the file replacement stating that the file is in use by windows, but it is not a Windows System file, it is the programs EXE. With the service off, the EXE should be able to be overwritten with my EXE that the batch is programmed to replace, yet I get the error of "File in use by Windows" when trying to overwrite even when SERVICES are stopped for the program.

Does anyone have any suggestions on how you can stop Windows from grabbing the programs EXE as "in use" when the service is stopped??? Would like to do this without having to run a utility on the systems manually off of another bootable device like USB thumb DRIVE then alter etc.

Thanks,

Dave



Discussion

No Comment Found