Set wsshell = CreateObject("WScript.Shell")
Set filesys = CreateObject("Scripting.FileSystemObject")
USERPROFILE = wsshell.ExpandEnvironmentStrings("%USERPROFILE%")
APPDATA = wsshell.ExpandEnvironmentStrings("%APPDATA%") + "\JetBrains"
Set reg = New RegExp
reg.Global = True
reg.IgnoreCase = True
reg.Pattern = "\.?(IntelliJIdea|WebStorm|PyCharm|GoLand|CLion|DataGrip|RubyMine|AppCode|PhpStorm|Rider).*"
Sub rmtree(ByVal f, ByVal path)
bMatch = reg.Test(f.Name)
If Not bMatch Then
Exit Sub
End If
If filesys.FolderExists(path) Then
filesys.DeleteFolder path, True
End If
End Sub
If filesys.FolderExists(USERPROFILE) Then
For Each f In filesys.GetFolder(USERPROFILE).SubFolders
rmtree f, USERPROFILE + "\" + f.Name + "\config\eval"
Next
End If
If filesys.FolderExists(APPDATA) Then
For Each f In filesys.GetFolder(APPDATA).SubFolders
rmtree f, APPDATA + "\" + f.Name + "\eval"
Next
End If
MsgBox "Reset the trial period of IDEA succeeded !"
Reset the trial period of IDEA.vbs
最新推荐文章于 2024-06-17 17:06:26 发布