Avatar of FSCSexpert

asked on 

Delprof utility

I am trying to run delprof in batch mode to delete all cached profiles on approx 200 remote PCs.
delprof works fine when I run it from a command prompt - finds the remote machine - deletes the profiles succesfully.
problem is when i put the syntax into a batch file - it runs up Delprof but displays error message "the network path was not found" for every PC on the domain -
I can obviously run this from a command prompt on a per machine basis but this will take forever - any suggestions
Windows 2000

Avatar of undefined
Last Comment
Avatar of fertigj

echo off
rem   This is a simple script that can copy files to a lot of machines at
rem   once.   The script will go through the list of commands that are put
rem   in below and run them on each machine that is listed in the server.txt
rem   file.   If a machine is not on the network, it will be skipped, and the script
rem   will move onto to the next machine until the last machine is reached.
rem   If there is a problem with a machine, a problem.txt file will be generated
rem   and all the problem machine names will be listed within this text file.  Likewise,
rem   all of the machines that were successful, will be listed in a good.txt file.
rem   THIS SCRIPT MUST BE RUN FROM A WINDOWS NT or 2000 box or it will not work.
Rem  Put all of the machines in a text file called Machines.txt

rem task.cmd

@echo off

for /f %%a in (machines.txt) do call :TASK_TO_PERFORM %%a
goto :EOF


      rem This line simply tells you which computer is being worked on
        echo Working on computer #%1 now!
        Rem This line checks to see if the computer is on the network
        Rem If the computer is not on the network, it will be skipped
      Rem and the script will move onto the next computer on the list.

        if not exist "\\%1\C$\*.*" goto :error

        Rem ----------------------------------------------------
        Rem Add your commands here!

        start delprof /q /i /c:\\%1
        Rem ----------------------------------------------------

        Rem This section writes to good.txt if the commands above where completed
        Rem without any problems for a given computer

      echo "---------------------------------------" >> good.txt
        date /t >> good.txt  
        time /t >> good.txt
        echo Computer %1 has been completed! >> good.txt
goto :EOF

Rem This section writes an error to a file to log computers missed
    echo "---------------------------------------" >> problems.txt
    date /t >> problems.txt  
    time /t >> problems.txt
    echo Computer #%1 had problems >> problems.txt
goto :EOF
Avatar of fertigj

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Windows 2000
Windows 2000

Windows 2000 is an operating system for use on both client and server computers. It is the successor to Windows NT 4.0, and is the last version of Microsoft Windows to display the "Windows NT" designation. Four editions of Windows 2000 were released (Professional, Server, Advanced Server, and Datacenter Server) that shared a core set of features, including many system utilities such as the Microsoft Management Console. All versions of the operating system support NTFS 3.0, Encrypting File System, as well as basic and dynamic disk storage. The Windows 2000 Server family includes support for Active Directory services, Distributed File System and fault-redundant storage volumes.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo