Skip to content

Instantly share code, notes, and snippets.

@FreeWall
Last active May 12, 2022 09:33
Show Gist options
  • Save FreeWall/5b3a4bb6e00b5d7048055df9c2b45452 to your computer and use it in GitHub Desktop.
Save FreeWall/5b3a4bb6e00b5d7048055df9c2b45452 to your computer and use it in GitHub Desktop.
FOR /F "tokens=*" %%i IN (' dir /b /A %HOMEPATH%\.PhpStorm* ') DO SET PHPSTORM_DIR=%HOMEPATH%\%%i
cd %PHPSTORM_DIR%
del config\options\other.xml
del config\eval\*.evaluation.key
reg delete "HKEY_CURRENT_USER\SOFTWARE\JavaSoft\Prefs\jetbrains\phpstorm" /f
FOR /F "tokens=*" %%i IN (' dir /b /A %APPDATA%\JetBrains\PhpStorm* ') DO SET PHPSTORM_DIR=%APPDATA%\JetBrains\%%i
cd %PHPSTORM_DIR%
del options\other.xml
del eval\*.evaluation.key
pause
@amiralian1372
Copy link

amiralian1372 commented Oct 13, 2020

This is for linux:

#!/bin/bash

for product in PhpStorm; do
  echo "Closing $product"
  ps aux | grep -i MacOs/$product | cut -d " " -f 5 | xargs kill -9

  echo "Resetting trial period for $product"

  echo "removing evaluation key..."
  rm -rf ~/.config/JetBrains/$product*/eval

  echo "removing all evlsprt properties in options.xml..."
  sed -i '' '/evlsprt/d' ~/.config/JetBrains/$product*/options/other.xml

  # Above path not working on latest version. Fixed below
  sed -i -E 's/<property name=\"evl.*\".*\/>//' ~/.config/JetBrains/$product*/options/other.xml
  sed -i '' '/evlsprt/d' ~/.config/JetBrains/$product*/options/other.xml

  echo
done

echo "removing additional plist files..."
rm -rf ~/.java/.userPrefs/jetbrains/phpstorm/

echo "restarting cfprefsd"
killall cfprefsd

echo
echo "That's it, enjoy ;)"

@midlan
Copy link

midlan commented Feb 12, 2021

setting moved to %HOMEPATH%/AppData/Roaming/JetBrains/PhpStorm2020.3/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment