2 Star 11 Fork 6

codepzj/jetbrains脚本激活工具

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CLion激活.vbs 2.66 KB
一键复制 编辑 原始数据 按行查看 历史
struggle-upwards 提交于 2023-11-24 00:48 . 点击vbs激活
Set oShell = CreateObject("WScript.Shell")
Set oEnv = oShell.Environment("USER")
Set oFS = CreateObject("Scripting.FileSystemObject")
software = "CLion"
javaagentFile = "clion64.exe.vmoptions"
javaagentkey = "clion.key"
Dim scriptPath, systemUser
scriptPath = oFS.GetFile(Wscript.ScriptFullName).ParentFolder.Path
systemUser = oShell.ExpandEnvironmentStrings("%APPDATA%")
jetPath = systemUser & "\JetBrains\"
if oFS.folderExists(jetPath) Then
Else
MsgBox "Please launch your " & software & " first!"
wscript.quit
End If
jetRiderCrackPath = systemUser & "\" & software
if oFS.folderExists(jetRiderCrackPath) Then
oFS.deleteFolder jetRiderCrackPath, True
End If
oFS.createFolder jetRiderCrackPath
oFS.createFolder jetRiderCrackPath & "\config\"
scriptPathConfig = scriptPath & "\config\"
if oFS.folderExists(scriptPathConfig) Then
oFS.CopyFile scriptPathConfig & "*", jetRiderCrackPath & "\config\"
Else
MsgBox "Pls unzip your crack package at all!"
wscript.quit
End If
oFS.createFolder jetRiderCrackPath & "\plugins\"
scriptPathPlugins = scriptPath & "\plugins\"
if oFS.folderExists(scriptPathPlugins) Then
oFS.CopyFile scriptPathPlugins & "*", jetRiderCrackPath & "\plugins\"
Else
MsgBox "Pls unzip your crack package at all!"
wscript.quit
End If
oFS.CopyFile scriptPath & "\active-agt.jar", jetRiderCrackPath & "\"
Exist = 0
Set allVersions = oFS.GetFolder(jetPath)
Set folders = allVersions.SubFolders
For Each folder in folders
pos = InStr(folder.name, software)
If pos <> 0 Then
Exist = pos
oFS.CopyFile scriptPath & "\" & javaagentFile, folder.path & "\", True
oFS.CopyFile scriptPath & "\" & javaagentkey, folder.path & "\", True
versionPath = folder.path & "\" & javaagentFile
ProcessVmOptions versionPath
End If
Next
Sub ProcessVmOptions(ByVal file)
Dim sLine, sNewContent, bMatch
Set oFile = oFS.OpenTextFile(file, 1, 0)
sNewContent = ""
Do Until oFile.AtEndOfStream
sLine = oFile.ReadLine
bMatch = re.Test(sLine)
If Not bMatch Then
sNewContent = sNewContent & sLine & vbLf
End If
Loop
oFile.Close
sNewContent = sNewContent & "--add-opens=java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED" & vbcrlf & "--add-opens=java.base/jdk.internal.org.objectweb.asm.tree=ALL-UNNAMED" & vbcrlf & "-javaagent:" & jetRiderCrackPath & "\active-agt.jar"
Set oFile = oFS.OpenTextFile(file, 2, 0)
oFile.Write sNewContent
oFile.Close
End Sub
If Exist <> 0 Then
MsgBox "Success!!! Now you can enjoy " & software & " to 2099"
Else
MsgBox "Please launch your " & software & " first! Then execute vbscript!!!"
End If
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pan-zhi_jian/jetbrains_activation.git
git@gitee.com:pan-zhi_jian/jetbrains_activation.git
pan-zhi_jian
jetbrains_activation
jetbrains脚本激活工具
master

搜索帮助