[BUG_FIXED] Check update without elevating to Administrator right.

[NEW_FEATURE] Activate auto-updating feature under Vista, Windows 7 and Windows 8.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@928 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2012-07-20 22:46:03 +00:00
parent 6224cf51b5
commit 6fc39bed3f
4 changed files with 8 additions and 11 deletions

Binary file not shown.

View File

@ -34,9 +34,11 @@
void Process::run()
{
TCHAR *opVerb = TEXT("open");
/*
winVer winVersion = (NppParameters::getInstance())->getWinVersion();
if (winVersion == WV_VISTA || winVersion == WV_WIN7)
opVerb = TEXT("runas");
*/
::ShellExecute(NULL, opVerb, _command.c_str(), _args.c_str(), _curDir.c_str(), SW_SHOWNORMAL);
}

View File

@ -4845,7 +4845,7 @@ struct Quote{
const char *_quote;
};
const int nbQuote = 69;
const int nbQuote = 73;
Quote quotes[nbQuote] = {
{"Notepad++", "Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size.\nBy optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment."},
{"Martin Golding", "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."},
@ -4914,14 +4914,12 @@ Quote quotes[nbQuote] = {
{"Anonymous #37", "My software never has bugs. It just develops random features."},
{"Anonymous #38", "LISP = Lots of Irritating Silly Parentheses."},
{"Anonymous #39", "Perl, the only language that looks the same before and after RSA encryption."},
{"Anonymous #40", "People ask me why, as an atheist, I still say: OH MY GOD.\nIt makes perfect sense: We say \"Oh my God\" when something is UNBELIEVABLE."},
{"Anonymous #41", "1. Dig a hole.\n2. Name it love.\n3. Watch people falling in love.\n"},
{"Hustle Man", "Politicians are like sperm.\nOne in a million turn out to be an actual human being."},
{"Confucius", "It's good to meet girl in park.\nBut better to park meat in girl."},
{"Friedrich Nietzsche", "There is not enough love and goodness in the world to permit giving any of it away to imaginary beings."},
{"Chewbacca", "Uuuuuuuuuur Ahhhhrrrrrr\nUhrrrr Ahhhhrrrrrr\nAaaarhg..."}
//{"", ""},
//{"", ""},
//{"", ""},
//{"", ""},
//{"", ""},
//{"", ""},
};

View File

@ -340,13 +340,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
doUpdate = false;
}
// Vista/Win7 UAC issue
bool isVista = (curWinVer >= WV_VISTA);
if (!winSupported)
nppGui._doesExistUpdater = false;
if (TheFirstOne && isUpExist && doUpdate && winSupported && !isVista)
if (TheFirstOne && isUpExist && doUpdate && winSupported)
{
Process updater(updaterFullPath.c_str(), version.c_str(), updaterDir.c_str());
updater.run();