Jump to content


Fun With Batch Files?


2 replies to this topic

#1 OFFLINE   dharvey

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 November 2005 - 01:21 AM

Hi everyone,

I'm really not sure if this is a CCleaner issue or a windows issue, but here it goes.

I've created the following batch file, and put it in the startup folder for the All Users folder on a Win XP machine.

"
echo off
cls
cd c:"program files"\CCleaner
CCleaner /auto

"

Here is the reason I'm doing this. I'm currently at war with the classic "Clean temp files in a multi user (upwards of 500) environment" issue. My plan was to use the above batch file to have each users temp files cleared on startup.

This doesn't seem to work though. When somebody logs on, the batch screen runs, and then closes. Temp files aren't deleted though. I'm fairly sure the batch works though, as when I go to start --> run and run the batch file there, the temp files are erased.

Thoughts on this? Or is this more of a windows issue then a CCleaner issue.

#2 OFFLINE   Andavari

    Captain Spectacular

  • Moderators
  • 13,327 posts
  • Gender:Male
  • Location:Shadow Moses

Posted 07 November 2005 - 06:34 AM

A simple solution without messing with the batch file is to create a link in the All Users startup area in the registry under "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", or even easier create a shortcut in: "C:\Documents and Settings\All Users\Start Menu\Programs\Startup"
Complexity of incoherent design.

#3 OFFLINE   pwillener

    ドラえもん

  • Members
  • PipPipPipPip
  • 662 posts
  • Gender:Male
  • Location:Tokyo, Japan

Posted 10 November 2005 - 03:11 AM

Two suggestions
  • You can select 'Run CCleaner when computer starts' in Options > Settings.
  • If you want to go ahead with the batch script, make sure it works. The script you have given here certainly won't work. Use cmd command prompt for testing the script.