139

Reset Navicat Premium 15/16 remaining trial days

 1 year ago
source link: https://gist.github.com/tuxity/32b353f00b38fe41c64434b98fdee077
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Reset Navicat Premium 15/16 remaining trial days

Thank you, this works perfect

how on ubuntu

how do reset trial on ubuntu

marcofoxx commented on Jan 6

Thanks a lot, it's working on my Mac

Wern-rm commented on Jan 10

chiendv commented on Mar 7

works great!

how do reset trial on ubuntu

how on ubuntu

my way to reset, tested on version 16

#!/bin/bash
dconf reset -f /com/premiumsoft/
rm -rf ~/.config/navicat/Premium/preferences.json*
~/apps/navicat16-premium-en.AppImage  # path of the navicat

save it to ~/apps/navicat_reset_trial.sh

then locate navicate.desktop or create one ~/.local/share/applications/navicat.desktop

[Desktop Entry]
Name=Navicat
Comment=Navicat MySQL Database Manager
Exec=~/apps/navicat_reset_trial.sh
Icon=~/apps/navicat.png # optiional
Terminal=false
Type=Application
Categories=Development
X-Desktop-File-Install-Version=0.24

filipemontt commented 23 days ago

edited

Macbook.
Version 16
Not working

#!/usr/bin/env bash

set -e

file=$(defaults read /Applications/Navicat\ for\ MySQL.app/Contents/Info.plist)

regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]

version=${BASH_REMATCH[1]}

echo "Detected Navicat Premium version $version"

case $version in
    "16")
        file=/Users/myname/Library/Preferences/com.navicat.NavicatForMySQL.plist
        ;;
    "15")
        file=~/Library/Preferences/com.prect.NavicatPremium15.plist
        ;;
    *)
        echo "Version '$version' not handled"
        exit 1
       ;;
esac

echo -n "Reseting trial time..."

regex="([0-9A-Z]{32}) = "
[[ $(defaults read $file) =~ $regex ]]

hash=${BASH_REMATCH[1]}

if [ ! -z $hash ]; then
    defaults delete $file $hash
fi

regex="\.([0-9A-Z]{32})"
[[ $(ls -a /Users/myname/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/ | grep '^\.') =~ $regex ]]

hash2=${BASH_REMATCH[1]}

if [ ! -z $hash2 ]; then
    rm /Users/myname/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/.$hash2
fi

echo " Done"

Output

Detected Navicat Premium version 16
Reseting trial time... Done

But not reset date, and show to register.

Thank you so much!

P.s I used this script with little modification for restore my trial period for Navicat for MySQL

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


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK