Jump to content

Windows 11 and automatic cleaning script


alf9872000

Recommended Posts

Hi,

 

With my PC running Windows 10 Pro, i use a script to clean folders, recycle bin, automatically each time the PC is restarted.

I use the Group Policy Editor (gpedit.msc) to do that; the script (.bat file) is placed in C:\Windows\System32\GroupPolicy\Machine\Scripts\Shutdown.

 

Example of lines in the script:

RD /S /Q "C:\Users\<user>\AppData\Local\Temp"

RD /S /Q "C:\Windows\Prefetch"

RD /S /Q "C:\Windows\SoftwareDistribution\Download"

RD /S /Q "C:\Windows\temp"
RD /S /Q "C:\$RECYCLE.BIN"

 

I have a new laptop under Windows 11 Home; i have enabled the gpedit.msc, but the script doen't work; folders and recycle bin do not go empty.

 

Any idea ?

Thanks.

 

Link to comment
Share on other sites


  • Replies 8
  • Views 3.7k
  • Created
  • Last Reply

Thanks for answers.

My laptop is an Acer Aspire 5 A517-52.

After booting on a bootable USB key, the installation setup asks where to install Windows but no partition is visible ?

 

Thanks for your help.

 

Link to comment
Share on other sites


@Akaneharuka

I already tried with Rufus; don't work; i think have found the solution.

My processor is an 11th generation (Intel Tiger Lake) and it is necessary to install the IRST (Intel® Rapid Storage Technology) driver.

You must copy the folder which contains the IRST files on the bootable USB key.

During installation, at the stage where you have to select a partition (which is not visible), you have to load the IRST driver to make the partition appear.

 

I will test it.

Link to comment
Share on other sites


  • 1 month later...
On 12/24/2022 at 7:36 AM, alf9872000 said:

@Akaneharuka

I already tried with Rufus; don't work; i think have found the solution.

My processor is an 11th generation (Intel Tiger Lake) and it is necessary to install the IRST (Intel® Rapid Storage Technology) driver.

You must copy the folder which contains the IRST files on the bootable USB key.

During installation, at the stage where you have to select a partition (which is not visible), you have to load the IRST driver to make the partition appear.

 

I will test it.

@alf9872000 I'm not sure if it's too late, but did your solution work? I've stopped using Rufus ever since I discovered Ventoy - https://github.com/ventoy/Ventoy. You can also change your version of windows using the MAS script - https://github.com/massgravel/Microsoft-Activation-Scripts/releases.

I've updated my windows version to Enterprise as all features work well.

Link to comment
Share on other sites


@nsaner2006

1. To use the Group Policy, you need a Pro version of Windows (i now have a Pro version; it's OK)

2. About the problem of 'invisible' partition during installation of Windows, it's solved. It is necessary to install the IRST (Intel® Rapid Storage Technology) driver; without this, the installation is impossible, either with [Windows] Media Creation Tool, Rufus or Ventoy.

Link to comment
Share on other sites


Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...