This forum is in archive mode. You will not be able to post new content.

Author Topic: Tech support tips: make ccleaner run for every user on domain  (Read 866 times)

0 Members and 1 Guest are viewing this topic.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Tech support tips: make ccleaner run for every user on domain
« on: February 17, 2014, 11:59:41 AM »
We have a few computer classes that get slower and slower every day practically. We do maintenance on those computer from time to time, like defragging and cleaning the crap out. Defragging is ok, because it works on whole disk, but cleaning the shit is a bit of a problem to do it generally. Since our computers all are connected to the domain, each user connecting to a computer gets his profile created, and all the temp shit is put in there.

I thought of making a scheduled task to run for every student that logs on, but it proved to be a bit tricky for domain users. Eventually I was able to make a batch file to do it correctly.

Code: [Select]
@echo off

REM Script that silently installs CCleaner from a remote location and schedules a task to run it for every user that logs in
ECHO.

ECHO * Installing CCleaner with Default options
\\remotelocation\ccsetup.exe /S
ECHO * Adding a CCleaner task
schtasks /create /f /ru Users /sc onlogon /tn CCleaner /tr "\"%programfiles%\CCleaner\CCleaner.exe\" /auto"

ECHO.
pause

The script is simple as you can see. Here's a little explanation:
  • /f - force create a task. Means overwrite if it exists.
  • /ru Users - run as a user. As I understand you can specify a single user or a User group for which this task would apply. Since all our students are part of Users group, this will work for me.

Offline Traitor4000

  • Knight
  • **
  • Posts: 191
  • Cookies: 8
    • View Profile
Re: Tech support tips: make ccleaner run for every user on domain
« Reply #1 on: February 17, 2014, 09:26:00 PM »
Neat there is not really any reason I could need to use that but still nice.
The most vulnerable part of an impenetrable system is those who believe it to be so.

Offline proxx

  • Avatarception
  • Global Moderator
  • Titan
  • *
  • Posts: 2803
  • Cookies: 256
  • ФФФ
    • View Profile
Re: Tech support tips: make ccleaner run for every user on domain
« Reply #2 on: February 19, 2014, 10:25:57 PM »
Thanks I could use something like that.
+1
Wtf where you thinking with that signature? - Phage.
This was another little experiment *evillaughter - Proxx.
Evilception... - Phage

 



Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.