Members
Stats
  • Total Posts: 28531
  • Total Topics: 8240
  • Online Today: 945
  • Online Ever: 51419
  • (01. January 2010., 10:27:49)












Author Topic: Automated system maintenance: my overview  (Read 2613 times)

0 Members and 1 Guest are viewing this topic.

devnullius

  • SCF VIP Member
  • *****
  • Posts: 3507
  • KARMA: 152
  • Gender: Female
    • SCForum.info
Automated system maintenance: my overview
« on: 03. April 2013., 20:19:01 »
EDIT: GOTD comments system removed some of my script contents :( ONLY this article allows full, correct batch scripts... PLEASE KEEP IN MIND!

ALL SCRIPTS CAN BE DOWNLOADED FROM HERE: https://www.box.com/s/j5kpjw8djmxortpb5l43

FROM: (in moderation) http://www.giveawayoftheday.com/ashampoo-winoptimizer-2013/comment-page-1/#comment-347085

This is what I do for my friends…

- avast home 8 free
- browserprotect.org
- winpatrol plus lifetime license (I definitely prefer AnVir Taskmanager, also on GOTD)
- Cleanup! by Steven Gould
- Wise Registry Cleaner (yes, registry cleaning is safe since the 00′s ;p). Schedule it to only run when computer is idle. You need to fine-tine through Task Scheduler*.
- Acronis Drive Monitor
- Soluto

Install all.

Then, from elevated cmd.exe prompt:
%SystemRoot%\system32\cleanmgr.exe /sageset:60

Set options as you like.

Then, from elevated cmd.exe prompt:
chkntfs /T:3

Then, I make a C:\CheckDisk\cleanup.bat script, that I schedule at user logon:
cd %HOMEDRIVE%\
%HOMEDRIVE%\PROGRA~1\CLEANUP!\cleanup -AutoRun
%HOMEDRIVE%\PROGRA~2\CLEANUP!\cleanup -AutoRun
%HOMEDRIVE%\PROGRA~3\CLEANUP!\cleanup -AutoRun
%HOMEDRIVE%\PROGRA~4\CLEANUP!\cleanup -AutoRun
exit

Start command in scheduler is:
%comspec% /c start /min “C:\CheCKDisk\Cleanup.bat”

The same way I schedule a checkdisk script to run once every xx days, even after a missed schedule:
echo chkdsk c: /f /v /x
chkdsk c: /f /v /x < %SystemDrive%\CHecKDiSK\answer-yes.txt >> %SystemDrive%\CHecKDiSK\chkdsk-c.log
exit

For this to work, you need to create an extra file, named C:\Checkdisk\answer-yes.txt. Contents of this file:
y

(make sure there is an Enter after the “y”!).

Finally I create a go-sfc.bat script:
echo ——— >> C:\CheCKDisk\sfc.log
echo. >> C:\CheCKDisk\sfc.log
echo New run, new numbers… >> C:\CheCKDisk\sfc.log
echo. >> C:\CheCKDisk\sfc.log
echo. >> C:\CheCKDisk\sfc.log
echo Captain’s Log… >> C:\CheCKDisk\sfc.log
date /T >> C:\CheCKDisk\sfc.log
time /T >> C:\CheCKDisk\sfc.log
echo. >> C:\CheCKDisk\sfc.log
cls
echo System File Check running…
echo.
sfc /scannow >> C:\CheCKDisk\sfc.log
echo.
echo Done! Thank you : )
echo. >> C:\CheCKDisk\sfc.log
echo. >> C:\CheCKDisk\sfc.log
date /T >> C:\CheCKDisk\sfc.log
time /T >> C:\CheCKDisk\sfc.log
exit

I will post a copy of this post, here: http://scforum.info/index.php/topic,8077.msg20485.html . I’ll also update that thread with my compress.bat script and some more tips if I think of them. I’d follow it if I were you… Really :)

Karma...

Devvie


~~~ notemail@facebook.com ~~~

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare
——
All spelling mistakes are my own and may only be distributed under the GNU General Public License! – (© 95-1 by Coredump; 2-013 by DevNullius)



* more info’s!!
Run commands Windows: http://scforum.info/index.php/topic,7997.0.html .
God-mode folder: http://scforum.info/index.php/topic,3544.msg19952.html#msg19952 .
More information about bitcoin, altcoin & crypto in general? GO TO  j.gs/7385484/btc

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare... So why not get the real SCForum employees to help YOUR troubled computer!!! SCF Remote PC Assist http://goo.gl/n1ONa9

Samker's Computer Forum - SCforum.info

Automated system maintenance: my overview
« on: 03. April 2013., 20:19:01 »




devnullius

  • SCF VIP Member
  • *****
  • Posts: 3507
  • KARMA: 152
  • Gender: Female
    • SCForum.info
Re: Automated system maintenance: compress.bat script
« Reply #1 on: 03. April 2013., 20:50:35 »
compress.bat sript. Place it in C:\CheCkDisk\compress.bat

Schedule with task scheduler every xx days, with following command:
%comspec% /c start /min “C:\CheCKDisk\Compress.bat” .

Make sure you have installed Cleanup.bat.
Make sure you ran elevated cmd: %SystemRoot%\system32\cleanmgr.exe /sageset:60
Copy MsiZap* tool to c:\checkdisk folder

Contents for compress.bat:
@echo off
cls
echo.
echo Log will be created in C:\CHeCKDiSK\compress.log...
date /T > C:\CheCKDiSK\compress.log
time /T >> C:\CheCKDiSK\compress.log
echo.

echo Cleaning up orphaned system files...
C:\CheCKDisk\MsiZap.exe G! >> C:\CheCKDiSK\compress.log

echo.

echo Cleanup! by Steven Gould...
echo Cleans up temp files.
echo Prevents virus spreading and
echo keeps fragmentation of classic hdd's in check...
echo.
echo Greetz D


cd %HOMEDRIVE%\
%HOMEDRIVE%\PROGRA~1\CLEANUP!\cleanup -AutoRun
%HOMEDRIVE%\PROGRA~2\CLEANUP!\cleanup -AutoRun
%HOMEDRIVE%\PROGRA~3\CLEANUP!\cleanup -AutoRun
%HOMEDRIVE%\PROGRA~4\CLEANUP!\cleanup -AutoRun

echo.
echo Opruimen met Microsoft's standaard clean manager...
cd %HOMEDRIVE%%HOMEPATH%
echo Execute following in Administrator cmd.exe ONCE %SystemRoot%\system32\cleanmgr.exe /sageset:60
call %SystemRoot%\system32\cleanmgr.exe /d c: /sagerun:60

echo.


cd\

echo Comprimeren van diverse Windows bestanden en Folders...
compact /C /S /A /I "C:\Windows\$*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Downloaded Installations\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Driver Cache\*.*" >> C:\CheCKDiSK\compress.log
echo Entry below will get access denied for all files. Therefore disabled by echo...
echo compact /C /S /A /I "C:\Windows\System32\DriverStore\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\I386\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\logs\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\windows\*.inf" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\windows\*.ini" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\windows\*.pnf" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\windows\*.cab" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\windows\*.exe" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\windows\*.msi" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\windows\*.mui" >> C:\CheCKDiSK\compress.log
compact /C  /A /I "C:\WINDOWS\*.log" >> C:\CheCKDiSK\compress.log
compact /C  /A /I "C:\WINDOWS\*.txt" >> C:\CheCKDiSK\compress.log
compact /C  /A /I "C:\WINDOWS\*.chm" >> C:\CheCKDiSK\compress.log
compact /C  /A /I "C:\WINDOWS\*.bmp" >> C:\CheCKDiSK\compress.log
compact /C  /A /I "C:\WINDOWS\*.hlp" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\internet logs\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\minidump\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Ie6\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Ie6updates\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Ie7\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Ie7updates\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Ie8\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Ie8updates\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Ie9\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\Ie9updates\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\ServicePackFiles\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\WINDOWS\SoftwareDistribution\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\Van Dale\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\MSOCache\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\config.msi\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\Update\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\DRIVERS\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\Documentation\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\i386\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\CheckDisk\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\Toshiba\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\swsetup\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\acer\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\hp\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\dell\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\drivers\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\tools\*.*"  >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\sl\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\ibm\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\valueadd\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\support\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\books\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\intel\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\driver\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\fsc-reg\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\manual\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\nero\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "c:\manuals\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "C:\HP Universal Print Driver" >> C:\CheCKDiSK\compress.log

echo Leave CD ROM ALLONE, so NO compact /C /S /A /I "d:\*.*" >> C:\CheCKDiSK\compress.log

c:
cd %userprofile%
compact /C /S /A /I "Mijn Documenten\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "My Documents\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Documenten\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Documents\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Downloads\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Pictures\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Afbeeldingen\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Videos\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Video's\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Music\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Muziek\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Recorded TV\*.*" >> C:\CheCKDiSK\compress.log

cd\
cd C:\Users\Public\
compact /C /S /A /I "Mijn Documenten\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "My Documents\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Documenten\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Documents\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Downloads\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Pictures\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Afbeeldingen\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Videos\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Video's\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Music\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Muziek\*.*" >> C:\CheCKDiSK\compress.log
compact /C /S /A /I "Recorded TV\*.*" >> C:\CheCKDiSK\compress.log
echo.
echo Done!
echo.
c:
cd\
cd CHeCKDiSK

exit


End of script, begin of Karma ;p


devnullius


* http://www.extorr.com/readme_cdrom3.htm#Uninstalling (SOURCE: http://blogs.msdn.com/b/astebner/archive/2004/09/08/227118.aspx)
More information about bitcoin, altcoin & crypto in general? GO TO  j.gs/7385484/btc

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare... So why not get the real SCForum employees to help YOUR troubled computer!!! SCF Remote PC Assist http://goo.gl/n1ONa9

Pez

  • SCF VIP Member
  • *****
  • Posts: 723
  • KARMA: 116
  • Gender: Male
  • Pez
Re: Automated system maintenance: my overview
« Reply #2 on: 04. April 2013., 12:34:18 »
Nice article!
Karma for it.  :up:

But sorry I disagree to the use of the compact command on particular systemdrives ! But also on other drives.
If you need to use it in a system drive you probably also need to by a larger disk instad because the system probably is old and with slow performance. If you compact a system disk you also slow down the system and compacted files decrease the disks defragmantation that give you match slover performance of the system.
My recomandation is to insted by a larger disk. The last thing you should do is to compress a system drive! If you do it you probebly get more problem in the end that you try to solve. This due to the function of how the compessed files and folder is working.

Note also that you can lost diskspace with compression of arcivefiles like zip and rar insted of earning diskspace. This because the files is allready compressed and you just get multiple compression headers.



http://support.microsoft.com/kb/251186/en-us

Best practices for NTFS compression in Windows

While NTFS file system compression can save disk space, compressing data can adversely affect performance. NTFS compression has the following performance characteristics. When you copy or move a compressed NTFS file to a different folder, NTFS decompresses the file, copies or moves the file to the new location, and then recompresses the file. This behavior occurs even when the file is copied or moved between folders on the same computer. Compressed files are also expanded before copying over the network, so NTFS compression does not save network bandwidth.

Because NTFS compression is processor-intensive, the performance cost is more noticeable on servers, which are frequently processor-bound. Heavily loaded servers with a lot of write traffic are poor candidates for data compression. However, you may not experience significant performance degradation with read-only, read-mostly, or lightly loaded servers.

 If you run a program that uses transaction logging and that constantly writes to a database or log, configure the program to store its files on a volume that is not compressed. If a program modifies data through mapped sections in a compressed file, the program can produce "dirty" pages faster than the mapped writer can write them. Programs such as Microsoft Message Queuing (also known as MSMQ) do not work with NTFS compression because of this issue.

Because user home folders and roaming profiles use lots of read and write operations, Microsoft recommends that you put user home folders and roaming profiles on a volume that does not have NTFS compression on the parent folder or on the volume root. Individual users may still enable compression on their folders, but the overall number of compressed files and folders is smaller. On servers that host compressed volumes, you should use careful performance monitoring to determine whether the CPU has enough capacity to support the compress/decompress operations that are being performed.

Their is two easy way to configure a system!
Every thing open and every thing closed.
Every thing else is more or less complex.

Start Turfing ! http://scforum.info/index.php/topic,8405.msg21475.html#msg21475

Samker

  • SCF Administrator
  • *****
  • Posts: 7206
  • KARMA: 291
  • Gender: Male
  • Whatever doesn't kill us makes us stronger.
    • SCforum.info - Samker's Computer Forum
Re: Automated system maintenance: my overview
« Reply #3 on: 04. April 2013., 19:12:03 »
Nice article!
Karma for it.

...

I agree...  :up:

However, when We talk about registry, I only trust to "TuneUp Utilities" & "CCleaner" (*free app): http://scforum.info/index.php/topic,1133.0.html


devnullius

  • SCF VIP Member
  • *****
  • Posts: 3507
  • KARMA: 152
  • Gender: Female
    • SCForum.info
Re: Automated system maintenance: my overview
« Reply #4 on: 19. April 2013., 05:51:18 »
(for the record: I disagree with both replies. All remarks have been accounted for and are rigorously tested. All alternatives are known by me and abandoned due to small problems. Any default icons missing their icon, Samker?? It's a TuneUp thing. Used it for many years, abandoned it in 2010, 2011?).

Peace!

devnullius 
More information about bitcoin, altcoin & crypto in general? GO TO  j.gs/7385484/btc

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare... So why not get the real SCForum employees to help YOUR troubled computer!!! SCF Remote PC Assist http://goo.gl/n1ONa9

devnullius

  • SCF VIP Member
  • *****
  • Posts: 3507
  • KARMA: 152
  • Gender: Female
    • SCForum.info
Re: Automated system maintenance: my overview
« Reply #5 on: 19. April 2013., 05:54:17 »
... one remark should have been made, but hasn't.

Cleaning temp files at log-on might cause file-system / hard-disk problems due to frequent adding and removing of files. Regular boot-time checkdisk really must accompany the cleanup.bat script!

Same remark goes for - in lesser extend - puran defrag (XP/Vista - Win7/8 users should use daily build-in defrag...!!).

Karma!

devnullius
More information about bitcoin, altcoin & crypto in general? GO TO  j.gs/7385484/btc

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare... So why not get the real SCForum employees to help YOUR troubled computer!!! SCF Remote PC Assist http://goo.gl/n1ONa9

Pez

  • SCF VIP Member
  • *****
  • Posts: 723
  • KARMA: 116
  • Gender: Male
  • Pez
Re: Automated system maintenance: my overview
« Reply #6 on: 19. April 2013., 09:04:16 »
(for the record: I disagree with both replies. All remarks have been accounted for and are rigorously tested. All alternatives are known by me and abandoned due to small problems. Any default icons missing their icon, Samker?? It's a TuneUp thing. Used it for many years, abandoned it in 2010, 2011?).

Peace!

devnullius 

Im sorry that you desagree with my comment about compression. I rest my case but I still belive I right and I have providing my reason in Microsofts own comment in my not abow. You get it her ons again also: http://support.microsoft.com/kb/251186/en-us

Sometimes Microsoft intodruse function that many ask for but both Microsoft and experence users know that it is not good to use them because of different reson. Compactting executable file in a system drive is one of them!
One other thing about compacting files That cant be defragmented and thay increase fragmentation of a disk. That is realy bad for a system drive and decrease the performence more and more over the time. It is alway better to by a larger physical disk than get a disk compacted!
Their is two easy way to configure a system!
Every thing open and every thing closed.
Every thing else is more or less complex.

Start Turfing ! http://scforum.info/index.php/topic,8405.msg21475.html#msg21475

devnullius

  • SCF VIP Member
  • *****
  • Posts: 3507
  • KARMA: 152
  • Gender: Female
    • SCForum.info
Re: Automated system maintenance: my overview
« Reply #7 on: 20. April 2013., 20:46:19 »
Pez, please read: http://superuser.com/questions/411720/how-does-ntfs-compression-affect-performance - you'll find Best Answer an interesting read.

I really have thought about the compress.bat. Really. I did. And tested it. For many many many years on countless systems. Same for other scripts.

Amen.

devnullius
More information about bitcoin, altcoin & crypto in general? GO TO  j.gs/7385484/btc

Cuisvis hominis est errare, nullius nisi insipientis in errore persevare... So why not get the real SCForum employees to help YOUR troubled computer!!! SCF Remote PC Assist http://goo.gl/n1ONa9

Samker

  • SCF Administrator
  • *****
  • Posts: 7206
  • KARMA: 291
  • Gender: Male
  • Whatever doesn't kill us makes us stronger.
    • SCforum.info - Samker's Computer Forum
Re: Automated system maintenance: my overview
« Reply #8 on: 21. April 2013., 18:53:57 »
(for the record: I disagree with both replies.

...

 Any default icons missing their icon, Samker?? It's a TuneUp thing. Used it for many years, abandoned it in 2010, 2011?).


...


Only if you manually change some default settings related to "icons"... ;)


 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
Second Anti-Bot trap, type or simply copy-paste below (only the red letters):www.scforum.info:

Enter your email address to receive daily email with 'SCforum.info - Samker's Computer Forum' newest content:

Terms of Use | Privacy Policy | Advertising