Similarly, if you place it in HKEY_CURRENT_USER (your own) Run key, then you will need to have Administrator rights by default or many files will not be deleted - you will not be prompted, those files will remain as they are. Note that if you place it at the HKEY_LOCAL_MACHINE’s Run key, then, you will need to remove the “ %USERPROFILE%” temp path from the command. You can automate this by placing the command in your Windows Registry under the Run key so that it is run at every system startup. So, ensure that no downloads or installations are in progress before running the command. vbs files is WSH (Windows Script Host), which is included with Win98 and WinME, and can be added to Win95 by means of a free download from Microsoft (Internet Explorer 4+ required. This will cause problems with the download or installation. VBScript (Visual Basic Scripting) is a handy tool for File, Drive and Registry maintenance in Win9x. If you are currently downloading something or have an installation in progress, those programs will place data temporarily in the TEMP folders and some or all of this data will get deleted.The above script will not delete files that are currently open (say a program is keeping a file open and locked, that file will not be deleted).You will see a command window pop up, a string of output running through and then the window will disappear. Caution: Do not remove the files when the server is running.
#Windows server script to clean up cab files in temp folder drivers
Usage: By default, the server JVM log, process log, server.pid and trace files are stored in the location. While it is possible to double-click downloaded Intel drivers and extract files from within your Windows operating system, if you need to extract an Intel.
![windows server script to clean up cab files in temp folder windows server script to clean up cab files in temp folder](https://cdn.staticaly.com/gh/bcurran3/ChocolateyPackages/master/choco-cleaner/choco-cleaner_before.png)
Now right click on the file you saved and run it with elevated rights (Run as Administrator). If you see the file size grow, delete the directory (except the monitor.state file) after stopping the node agent server. Save the above Notepad file as “ ClearTemp.cmd” (File > Save As, change the filter from “Text files” to “All files” and then provide the file name). DEL /S /Q "%USERPROFILE%\Local Settings\Temp\*.*"