Jump to content

cleanmgr as a script runs indefinitely


focusedddd

Recommended Posts

I made a basic script to run diskcleanup silently, I already configured it...and the script seems to execute the disk cleanup on the local machine but it runs indefinitely, meaning pulse way doesn't seem to know when the script is done. ..any help is appreciated 

 

cleanmgr /verylowdisk /sagerun:5

Link to comment
Share on other sites

On 7/12/2020 at 8:21 AM, focusedddd said:

I made a basic script to run diskcleanup silently, I already configured it...and the script seems to execute the disk cleanup on the local machine but it runs indefinitely, meaning pulse way doesn't seem to know when the script is done. ..any help is appreciated 

 

cleanmgr /verylowdisk /sagerun:5

Cleanmgr needs UI to run, so as a workaround you can use SysInternal's PsExec as part of the disk cleaning process and by using PsExec with its '-si' arguments, you'll be able to perform your script through Pulseway. Without being able to spawn the UI, the cleanmgr process will hang thus leaving the Pulseway script execution running indefinitely.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...