Clean and Restart Script Not Shutdown

I understand I can make a script to clean and then shutdown the computer with the following...

CCleaner64.exe /AUTO /SHUTDOWN

However I am unable to make a script to clean and reboot. I thought it would have been ...

CCleaner64.exe /AUTO /SHUTDOWN /R

But the above doesn't work. I have tried other options but nothing seems to restart my computer. I can restart if I type SHUTDOWN /R directly into command prompt but not if using ccleaner first.

Anyone have any ideas what I am doing wrong ?

Thank you.

you are mixing apples and oranges

the ccleaner command switch "/Shutdown" is not the same thing as the command line "Shutdown".

ccleaner has no restart facility

Ahh I see that explains it, I understand now and I wish I had asked much earlier as I have been puzzling over this for some time !

Thank you very much for your help. :)

A simple Windows batch file can do it!

Example:

"%ProgramFiles%\CCleaner\ccleaner.exe" /auto
shutdown.exe -r -t 5 -c "System restart after CCleaner"

Hello Andavari

I am very sorry I didn't notice your post until now, thank you for your help and reply. I had managed to work it out but it is good of you to post to show others. :)