Jump to content

[How-to] Automate drive maintenance - BETA


GeneralMandible

Recommended Posts

DISCLAIMER: This is not a finished product. It has minimal error trapping coded into it. Please look at the code prior to running. If you do not understand the code, you may not want to try these until they are in a more "finished" state.

This works for XP Pro, but I'm not sure about Home Edition/2003/2000. I thought this might be useful since it automates things that people often forget about & people don't have to download any software. I have it running on a couple of machines & it works just fine. It's not as good as some of the stuff you pay for, but it's better than nothing. :)

Maintenance Scripts

NOTE: This is all done through VBScript, now.

Edited by GeneralMandible
Link to comment
Share on other sites


Just a suggestion about your download package - make it at least have some sort of prompt before extracting the files. Having it all of a sudden drop a command window in front of you can be intimidating.

Also, try making the "installer" a VBS script. It can run without the big fat window and it'll look more professional. :)

Link to comment
Share on other sites

It's not just adding a prompt that would bother me, here's my initial impressions.

This thing is not very well designed, it uses a strange mix of .reg, .vbs, .bat and .cmd, assumes too much about the system upon which it is going to be blindly run. It doesn't perform sufficient checks prior to running, does things like including hard coded paths, deletes your pagefile, tries to shut down a bucket load of processes, the names for which are just guessed, deletes whatever it wants in the cleanmgr.

I think it still has a good way to go before it should be released to unsuspecting users. The problem is that the type of person incapable of fully understanding the code is also the type of person most likely to want to use your scripts.

Link to comment
Share on other sites

It's not just adding a prompt that would bother me, here's my initial impressions.

This thing is not very well designed, it uses a strange mix of .reg, .vbs, .bat and .cmd, assumes too much about the system upon which it is going to be blindly run. It doesn't perform sufficient checks prior to running, does things like including hard coded paths, deletes your pagefile, tries to shut down a bucket load of processes, the names for which are just guessed, deletes whatever it wants in the cleanmgr.

I think it still has a good way to go before it should be released to unsuspecting users. The problem is that the type of person incapable of fully understanding the code is also the type of person most likely to want to use your scripts.

Adding a prompt wouldn't be hard...but is it worthwhile for me to spend a bunch of time making it universal to all systems? making it really pretty like Vista? Not really. I posted these because I figured someone could find them useful. The process/service names were not guessed. They were ones on my systems. People can go in and modify them as they see fit. Stopping them lets things run more smoothly. This is by no means a "finished product." It's just a tool that people can tweak and use as they see fit. I guess I should put a better explaination and disclaimer on it. It doesn't delete the pagefile, it "clears" & disables it (allowing it to be defragged), then reactivates it. As for the mix of files, it was the simplest way to get things done. Eventually I may move it all to vbscript.

If a lot of people would like for this to be put into a Maintenenace interface for XP, I may find it worthwhile to put it into a customizable app as opposed to multiple scripts.

Link to comment
Share on other sites

Clearing the pagefile on shutdown should mean that it has no information inside it to require defragging!

As you said, the scripts are by no means a finished product, but they don't just need tweaking, they need practically a re-write.

Link to comment
Share on other sites

Clearing the pagefile on shutdown should mean that it has no information inside it to require defragging!

As you said, the scripts are by no means a finished product, but they don't just need tweaking, they need practically a re-write.

Clearing the pagefile means writing 0's to all inactive pages. The file can still be fragmented, meaning it is broken into to different parts on the disk.

They work pretty well on all my XP Pro machines for needing a re-write.

I'm guessing you are saying "yes" to putting it into an app. As long as it is completely customizable: install path, cleanup mgr options, pagefile options, etc. It would just be an interface for some of the features built into XP, but more user friendly. Any other constructive ideas of things it should have?

Link to comment
Share on other sites

No, I don't care whether it is a series of scripts or an application, I wouldn't be using it anyhow. The problem is that it uses inappropriate or less efficient commands and script types and has no regard for either the user or their system.

The last thing I want to do in order to make a little more space on my system, is to create a new user, log in as them and as a consequence set up a whole new profile folder and contents. I don't want hard coded paths in a reg file, I don't want a folder creating somewhere on the root of my systemdrive without asking and the assumption that my temporary files need removing. I don't want this thing to run at a time and date of your choosing, I don't want processes stopping that don't exist, and I don't want services starting which may already be started. Most of all however, other than a routine to back up one branch of the registry, there is no error trapping at all being used. On this sort of thing, that makes this very dangerous to use.

Edited by Yzöwl
Link to comment
Share on other sites

The last thing I want to do in order to make a little more space on my system, is to create a new user, log in as them and as a consequence set up a whole new profile folder and contents.

My main goal with deleting temp files is not to save space, but to clean out the garbage that slows things down more than anything. I can have it delete the profile when the user logs in again. I've worked on machines that have over a GB of temporary internet files.

I don't want hard coded paths in a reg file, I don't want a folder creating somewhere on the root of my systemdrive without asking and the assumption that my temporary files need removing.
If people like the premise of automating these tasks, it would be worthwhile to add options for this. As of my initial posting, I was presenting the idea for people to customize as they see fit.
I don't want this thing to run at a time and date of your choosing,

The whole purpose of this is automation. It says in the install that it scheduled the task & that it can be changed.

I don't want processes stopping that don't exist,
Don't worry, this is impossible. No script can stop something that doesn't exist.
and I don't want services starting which may already be started.

If it starts a service that's already started, it's still running. It has no effect on the service.

Most of all however, other than a routine to back up one branch of the registry, there is no error trapping at all being used. On this sort of thing, that makes this very dangerous to use.

This I agree with...there is no error trapping...yet. You are assuming this to be a finished piece of software. They are just a set of scripts to automate some monotonous tasks. I agree that error checks need to be added to this. If this was scripted in VB with error trapping, asked the user lots of questions, & was highly configurable, would it be of use to a lot of people?

Link to comment
Share on other sites

General Mandible,

I have the utmost respect for anyone who does anything meaningfull to try to help others clean up their PC's.

Crap in the gap and junk in the trunk does more to slow down and corrupt a PC than all the viruses and spyware in the world.

I've been writing cleanup batch files for years to keep my own pc and those of my friends and customers clean and running at peak performance.

My little "Hoover.bat" program for windows 98 is now running on thousands of PC's in over 9 countries that I'm personally aware of.

My "XPCleanup.bat" program that I put on my own website is being used by many.

It deletes all the real "Junk" stuff from the HD.

Programs like windows "Disk Cleanup" and "Defrag" can just be programmed into the task Scheduler for a daily cleanup and a batch file like my "XPCleanup.bat" can be put into the Startup folder for a quickie cleanup every time the PC is rebooted.

Lines can easily be added to dump things like AV Quarantine folders, IM Cache folders, etc.

I have all that stuff in my own XPCleanup.bat file on my PC. I even added a line to dump the cache folder for my "Call Wave" program, that wants to save every message I receive on my phone while online.

All that cached stuff can kill a system if not dealt with on a regular basis. All it takes is a simple batch file in the right place (like the startup folder) to do the job.

All together, a system can be kept pretty clean and defragged without any real operator intervention.

For my own customers, I give them several cleanup and reorganize programs in a weekly cleanup routine.

I then give them a printed sheet of instructions on just how to run the routine. It gives them a sence of accomplishment to go through it and know that their PC is 'now' clean, defragged and error free.

Keep up the good work, :thumbup

Andromeda43 B)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...