Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Batch File - Start Program  (Read 3321 times)

0 Members and 1 Guest are viewing this topic.

powlaz

    Topic Starter


    Beginner
  • Thanked: 1
    Batch File - Start Program
    « on: March 21, 2007, 08:21:07 PM »
    I'm having some difficulty getting a small maintenance batch file to call a program that I downloaded that allows the defragmenter to run automatically on Windows 2000 machines.  The program will add a key to the users registry that I found on Kelly's Korner to speed up the Disk Cleanup utility on PCs with the NTFS file system.  It will then add another set of keys to the registry that are created as a result of running Cleanmgr/sageset:111.  Rather than run sageset on every user's PC I just exported the keys that were created on my PC and will call the registry edit in the batch file.  It will then run sagerun:111.  Finally it should call this disk defragmenter program.  Here's the problem:

    It won't run the disk defragmenter program.  
    All of the registry edits and this program (autodefrag.exe) are located in a folder here:
    G:\Installations\One Two Core Programs\Basic Maintenance\Disk Cleanup\autodefrag.exe

    On my computer the G drive is a mapped network drive.  Initially the batch file wouldn't engage the registry edits.  When I added quotation marks at either end of the path the problem was solved.  This isn't working for the AutoDefrag program though.  

    I have run AutoDefrag by clicking on it and calling it in the batch file from these locations:

    Desktop
    C:
    G:
    G:\Installations
    G:\Installations\One Two Core Programs

    After that it stops.

    I plan on scheduling the batch file to run this rudimentry maintenance on approximately 50 workstations until such time that the budget allows me to get a network defragmentation program and a pc maintenance utility (not really sure what's out there for this anyway).  The G: drive is a common drive that everyone has access to.  The rest of the path is preferred.

    Question:  How do I get this program to run from the preferred location (above).  This was my command in the batch file:

    start G:\Installations\One Two Core Programs\Basic Maintenance\Disk Cleanup\autodefrag.exe

    Thanks very much for the help,

    Po