-
Notifications
You must be signed in to change notification settings - Fork 1
/
ClearConst.vb
36 lines (33 loc) · 2.32 KB
/
ClearConst.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Public Class ClearConst
'----command
Public Shared ReadOnly DISM_CLEAR_UPDATE_IMAGE As String = "/Online /Cleanup-Image /StartComponentCleanup /ResetBase"
Public Shared ReadOnly POWERCFG_ACTIVE As String = "/SetActive "
'' If the OS version is lower than Windows 10 (1803), the excellent performance cannot be turned on.
'----path
Public Shared ReadOnly Property AppPath As String = Application.StartupPath + "\"
Public Shared ReadOnly WINDOWS_ROOT_PATH As String = Environment.GetFolderPath(Environment.SpecialFolder.Windows)
Public Shared ReadOnly WINDOWS_BT_FILE As String = WINDOWS_ROOT_PATH + "\$WINDOWS.~BT\"
Public Shared ReadOnly WINDOWS_WS_FILE As String = WINDOWS_ROOT_PATH + "\$WINDOWS.~WS\"
Public Shared ReadOnly RECYCLE_BIN_FILE As String = Path.GetPathRoot(WINDOWS_ROOT_PATH) + "$RECYCLE.BIN\"
Public Shared ReadOnly PREFETCH_FILE As String = WINDOWS_ROOT_PATH + "\Prefetch\"
Public Shared ReadOnly INTERNET_CACHE_FILE As String = Environment.GetFolderPath(Environment.SpecialFolder.InternetCache) + "\"
Public Shared ReadOnly APPDATA_ROAMING_TEMP As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\Temp\"
Public Shared ReadOnly APPDATA_LOCAL_TEMP As String = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) + "\Temp\"
Public Shared ReadOnly SYSTEM_TMP As String = Environment.GetEnvironmentVariable("TMP", EnvironmentVariableTarget.Machine) + "\"
Public Shared ReadOnly SYSTEM_TEMP As String = Environment.GetEnvironmentVariable("TEMP", EnvironmentVariableTarget.Machine) + "\"
Public Shared ReadOnly SYSTEM_TMPDIR As String = Environment.GetEnvironmentVariable("TMPDIR", EnvironmentVariableTarget.Machine) + "\"
Public Shared ReadOnly USER_TMP As String = Environment.GetEnvironmentVariable("TMP", EnvironmentVariableTarget.User) + "\"
Public Shared ReadOnly USER_TEMP As String = Environment.GetEnvironmentVariable("TEMP", EnvironmentVariableTarget.User) + "\"
Public Shared ReadOnly CURRENT_TEMP As String = Path.GetTempPath
End Class
Public Class SetSuperRunningToken
Inherits Attribute
Public Sub New(token As Privilege)
Program.GetToken(token)
End Sub
End Class
Public Module Helpers
Public Function SizeOf(obj As Object) As Integer
Return Len(obj)
End Function
End Module