Jump to content
Macro Express Forums

Win2000 Defragging


JLRoberts
 Share

Recommended Posts

Hello All,

 

I am a new user of Macro Express 3.0f. I need a macro to work on a Win2000 client PC that will defrag the C:drive and when finished perform a shutdown.

 

I note from Microsoft Knowledge Base 318759 that the defragger cannot be scripted or scheduled.

 

Is this job too much for Macro Express?

 

TIA

JLRoberts

Link to comment
Share on other sites

Macro Express certainly has the commands necessary to perform this task. However, whenever the defragger is running, if other programs are also running, the Windows defrag program puts up a warning message and starts the defrag over again. This may be the reason that Microsoft says "the defragger cannot be scripted or scheduled." However, I suggest you try it and see what happens.

 

If you have trouble with the defragger starting over, then you will need to try some tricks. For example, if you put Macro Express 'to sleep' during the duration of the defrag then the defragger should not start over. To do this, try the 'Wait Time Delay' or 'Wait Time Elapse' macro commands. These commands tell Windows to suspend Macro Express for a period of time. The challenge is that you will need to make an educated guess as to how long to put Macro Express to 'sleep'. You do not want Macro Express to wake up until the defrag process is complete.

 

So, if your defrag process takes two hours, put Macro Express to sleep for 2.5 hours or so after launching the defrag process. Then, when Macro Express 'wakes up', it can perform the shutdown.

 

You could write the macro so that after Macro Express 'wakes up' it determines if the defragger is still running and if so, go back to sleep for a longer period. The longer period would allow the defragger to start over and have more time to finish. If you keep a log (using the Log Messages command), the next day you can see when the macro performed certain steps (by examining the log file).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...