Easy Instructions for Running under the SYSTEM credentials

For those of us who have little-to-no scripting experience, here's how to set the CCleaner.exe file to run under the SYSTEM credentials, thus eliminating alot of issues resulting from permission errors (such as difficulties deleting those pesky Prefetch files):

Step 1: If you haven't already, download the PSTools.zip file from Microsoft (Here's a LINK if ye need it).

Step 2: Unzip the files to the following folder:

C:\Windows\PSTools

Step 3: Open Notepad (or just open your Run box and type notepad followed by ENTER)and chop'n'plop (cut and paste) the folowing line of text into the blank document:

psexec -d -i -e -s "C:\Program Files\CCleaner\CCleaner.exe"

*NOTE*: This assumes that the install location you have chosen for CCleaner is C:\Program Files\CCleaner, otherwise change it to match the location of CCleaner.exe on your PC.

Step 4: Save the Notepad file you have just created to the C:\Windows\PSTools folder as CCleaner.bat, or whatever-you-want-to-name-it.bat.

Step 5: Now that you have the script created, it is a simple matter of creating your shortcut and, if you're OCD like I am, changing the icon to match the CCleaner default icon.

Now, running CCleaner under the SYSTEM credentials is just a double-click away!

thanks for the script suggestion, and nice to see psexec can run a program under SYSTEM credentials.

unfortunately, on vista, this fails with error:

Couldn't install PsExec service:

Access is denied.

the only way i can get psexec to work is to run it as admin or from admin cmd. which, of course, eliminates the need for system credentials.

it remains impossible (as far as i can see) to invoke CCleaner from a (maintenance) script. fails due to vista's UAC. :( what a pain. any work-arounds?