Skip to content

Instantly share code, notes, and snippets.

@MinecraftPublisher
Created August 16, 2021 06:52
Show Gist options
  • Select an option

  • Save MinecraftPublisher/706c6640510ebd4780bb5fe7499aca3c to your computer and use it in GitHub Desktop.

Select an option

Save MinecraftPublisher/706c6640510ebd4780bb5fe7499aca3c to your computer and use it in GitHub Desktop.
Reset Jetbrains product evaluation

Reset Jetbrains product evaluation

You could reset your Jetbrains product evaluation timer using this Gist.

How to use

reset_eval.vbs is for Windows devices

reset_eval.sh is for Linux and MacOS devices

Download the one you need and double click it, This should reset the evaluation timer.

Compatibility

  • Compatible with Windows
  • Compatible with Linux
  • Compatible with MacOS

Supported Jetbrains products

  • IntelliJ Idea
  • CLion
  • PhpStorm
  • GoLand
  • PyCharm
  • WebStorm
  • Rider
  • DataGrip
  • RubyMine
  • AppCode
#!/bin/sh
OS_NAME=$(uname -s)
JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode"
if [ $OS_NAME == "Darwin" ]; then
echo 'Detected: MacOS'
for PRD in $JB_PRODUCTS; do
rm -rf ~/Library/Preferences/${PRD}*/eval
rm -rf ~/Library/Application\ Support/JetBrains/${PRD}*/eval
done
elif [ $OS_NAME == "Linux" ]; then
echo 'Detected: Linux'
for PRD in $JB_PRODUCTS; do
rm -rf ~/.${PRD}*/config/eval
rm -rf ~/.config/${PRD}*/eval
done
else
echo 'Your operating system is unsupported.'
exit
fi
echo 'Done!'
Set oShell = CreateObject("WScript.Shell")
Set oFS = CreateObject("Scripting.FileSystemObject")
sHomeFolder = oShell.ExpandEnvironmentStrings("%USERPROFILE%")
sJBDataFolder = oShell.ExpandEnvironmentStrings("%APPDATA%") + "\JetBrains"
Set re = New RegExp
re.Global = True
re.IgnoreCase = True
re.Pattern = "\.?(IntelliJIdea|GoLand|CLion|PyCharm|DataGrip|RubyMine|AppCode|PhpStorm|WebStorm|Rider).*"
Sub removeEval(ByVal file, ByVal sEvalPath)
bMatch = re.Test(file.Name)
If Not bMatch Then
Exit Sub
End If
If oFS.FolderExists(sEvalPath) Then
oFS.DeleteFolder sEvalPath, True
End If
End Sub
If oFS.FolderExists(sHomeFolder) Then
For Each oFile In oFS.GetFolder(sHomeFolder).SubFolders
removeEval oFile, sHomeFolder + "\" + oFile.Name + "\config\eval"
Next
End If
If oFS.FolderExists(sJBDataFolder) Then
For Each oFile In oFS.GetFolder(sJBDataFolder).SubFolders
removeEval oFile, sJBDataFolder + "\" + oFile.Name + "\eval"
Next
End If
MsgBox "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment