Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
'=== ClearTemp_HiddenStartup.vbs === Option Explicit Dim ws, fso, tempPath, file, folder, startupPath, scriptPath, shortcut Set ws = CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") ' TEMP folder path tempPath = ws.ExpandEnvironmentStrings("%TEMP%") ' Delete files inside TEMP If fso.FolderExists(tempPath) Then On Error Resume Next For Each file In fso.GetFolder(tempPath).Files file.Delete True Next For Each folder In fso.GetFolder(tempPath).SubFolders folder.Delete True Next On Error GoTo 0 End If ' Get this script's full path scriptPath = WScript.ScriptFullName ' Hidden startup shortcut startupPath = ws.ExpandEnvironmentStrings("%APPDATA%") & "\Microsoft\Windows\Start Menu\Programs\Startup\ClearTemp.lnk" If Not fso.FileExists(startupPath) Then Set shortcut = ws.CreateShortcut(startupPath) shortcut.TargetPath = "wscript.exe" shortcut.Arguments = Chr(34) & scriptPath & Chr(34) shortcut.WindowStyle = 0 ' Hidden window shortcut.Save End If
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)