Hey everyone!
I have changed the "C:\Users\***\AppData\Local\Temp" and "C:\Windows\Temp" directory to my HDD which is "G:\Temp\"
then I created a .bat file with this code:
then added the .bat file to Group Policy / User Config / Windows settings / Scripts / Logoff
So, whenever I click on restart or shutdown, Windows will run disk cleaner and then clears the G:\temp subfolders and files.
is it safe to click on restart after a Windows update? Does windows update store files in temp folders during an installation? or it's better to deactivate the .bat file before updating to make sure it doesn't ruin the update...
any suggestions?
thanks.
I have changed the "C:\Users\***\AppData\Local\Temp" and "C:\Windows\Temp" directory to my HDD which is "G:\Temp\"
then I created a .bat file with this code:
Code:
cleanmgr /sagerun 1
pushd "G:\Temp\" && (rd /s /q "G:\Temp\" 2>nul & popd)
So, whenever I click on restart or shutdown, Windows will run disk cleaner and then clears the G:\temp subfolders and files.
is it safe to click on restart after a Windows update? Does windows update store files in temp folders during an installation? or it's better to deactivate the .bat file before updating to make sure it doesn't ruin the update...
any suggestions?
thanks.
My Computers
System One System Two
-
- OS
- Windows 11 Pro 24H2
- Computer type
- Laptop
- Manufacturer/Model
- Huawei MateBook D15
- CPU
- Ryzen 5 3500U
- Memory
- 8GB
- Graphics Card(s)
- Vega 8
- Screen Resolution
- FHD
- Hard Drives
- 256GB Samsung SSD + 1TB HDD
- Browser
- Microsoft Edge
- Antivirus
- ESET Smart Security Premium
-
- Operating System
- Windows 10 Enterprise LTSC 21H2
- Computer type
- Laptop
- Manufacturer/Model
- MSI GS73 6RF Stealth Pro
- CPU
- intel core i7 6700HQ
- Memory
- 16GB
- Graphics card(s)
- Nvidia Geforce GTX1060 (6GB)
- Screen Resolution
- FHD
- Hard Drives
- 128GB SSD + 1TB HDD
- Browser
- Microsoft Edge
- Antivirus
- Windows Defender