You are not logged in.

#1 11 Feb 2007 04:51

fpojohn
Member
From: London England
Registered: 11 Feb 2007
Posts: 2
Website

Good House Keeping

Firstly I want to have the baby's of the person responsible for this site. I'm male but would consider surgery, that is to say, nice site.
I am a bit nervous about posting since I am not qualified to enter technical debate but I have this idea and believe I can cobble it together.
The idea burst into my feeble mind when I started using Windows XP and found it tripped a hardware switch to turn the power off at the system unit. If you can select an icon and walk away from the computer you could run all your house keeping tasks while you are not using it, defrag scandisk etc. If this is old news, sorry for wasting your time but why is it not available as standard on the OS. Even the task manager has no option to run programs at power down.
I will implement this utility in a bare format thanks to this wonderful site. PsShutdown, I would never have found it without this site! The format for the "beta" version (am I getting above myself?), will just be path-virus scan, path-scandisk, path-defrag, PsShutdown. If anybody can think of anything I am missing please post. I will have to experiment with some kind of framework, these things usually need fancy bracket and colons doted around and a nonexecute heading would be nice. Has any-one produced a general use template for batch files?
I would like to get around to providing a configure screen, you probably don't need to defrag your hard drive every time you use your system, would it do any harm? A post would be appreciated before I melt my hard drive.
Lastly, rather than use my dubious artistic talents in producing a desk top icon, is there a way of getting the "Turn Off Computer" icon, that appears after every thing closes down, to start a batch file?


For God's sake.......Love Satan!
The meaning of life.

Offline

#2 11 Feb 2007 14:56

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: Good House Keeping

Batch file templates are pretty much a personal preference, I tend to include some description comments - what the script does and also list the version of Windows it's been tested on.

I'm pretty sure you cant change the shutdown dialogue options without hacking Gina.Dll, which I would advise against.

If you look at the options for task scheduler, you can schedule tasks to start after xx minutes of idle time, depending on your patterns of work this may be a better option.

Offline

#3 15 Apr 2007 09:00

fpojohn
Member
From: London England
Registered: 11 Feb 2007
Posts: 2
Website

Re: Good House Keeping

Listing the version is a good point that I wouldn't have thought of.

Shutdown dialog options frightens me, HACKING A .DLL! no way. All I want to do is write a simple dos batch file ending with the command "Psshutdown", this I believe would execute the commands and then shut the computer down, no?

After xx minutes of idle time would task scheduler turn the computer off? I can't seem to find that option.


For God's sake.......Love Satan!
The meaning of life.

Offline

#4 16 Apr 2007 11:40

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,129

Re: Good House Keeping

Script:  It'd be a fairly simply matter to create a batch script as per your description, so long as the applications you are going to run at shutdown will play ball with the "start /w" command.

As a side issue, you can specify scripts to run at logoff/shutdown (and indeed logon/startup) using Group Policy.

Start>Run>"gpedit.msc"

Then expand: Computer Configuration>Windows Settings>Scripts (Startup/Shutdown)

And/or expand: User Configuration>Windows Settings>Scripts (Logon/Logoff)

But the problem with that is you won't see the progress, nor can you interrupt the scripts, which could be quite frustrating should you decide you didn't want to shutdown after all!

Shutdown on idle Task:  Create a scheduled task to run "psshutdown" (or whatever) and in the properties dialog, under the Schedule tab, select "When Idle" from the Schedule Task dialog.  You will have to edit the properties having already created the task, as the "Idle" option doesn't appear in the wizard.  You can thank Micro$oft for that piece of annoying buffoonery.
Defrag:  There's certainly no need to defrag your computer at each shutdown, but doing so shouldn't be problematic.  But it will probably slow down the whole shutdown process considerably.  Perhaps a better thing to do would be to smarten up your script so that it'll only defrag when you shutdown on a given day of the week/month, or every X shutdowns.
Icon:  You can find the standard "Turn off Computer" icon (and indeed many others) in shell32.dll -- if you don't know how to make this appear as an icon for your script then one might question whether you should be scripting in the first place wink

Last edited by bluesxman (16 Apr 2007 12:11)


cmd | *sh | ruby | chef

Offline

Board footer

Powered by