Created
December 29, 2014 09:26
-
-
Save davidfraser/e5fbfd2b8c85356ce68e to your computer and use it in GitHub Desktop.
Script to cleanup an Evernote installation under Wine, in order to allow reinstallation - see http://www.sgvulcan.com/evernote-under-wine-already-installed-by-another-user/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo first uninstall evernote using the wine uninstaller | |
wine uninstaller | |
echo now searching forregistry entry to remove | |
cd ~/.wine/drive_c/windows/profiles/$USER/temp | |
upgrade_code="`grep 'with upgrade code' EvernoteSetup.log | tail -n 1 | sed 's/^.*with upgrade code {\([A-Fa-f0-9-]*\).*$/\1/'`" | |
reverse_upgrade_code="`python -c "x='${upgrade_code}' ; y = x[:18].split('-') ; x = x.replace('-', '') ; z = [a+b for a, b in zip(x[16::2], x[17::2])] ; print ''.join(''.join(reversed(part)) for part in y+z).upper()"`" | |
echo please use regedit to navigate to '\HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer\UpgradeCodes\' and remove the key "$reverse_upgrade_code" | |
wine regedit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment