Removed unnecessary UAC prompt when editing skins in My Documents.

This commit is contained in:
Kimmo Pekkola 2009-08-04 09:35:56 +00:00
parent 428669287a
commit 848cd361e3

View File

@ -2336,7 +2336,8 @@ LRESULT CMeterWindow::OnCommand(WPARAM wParam, LPARAM lParam)
command += L" \""; command += L" \"";
command += m_SkinPath + L"\\" + m_SkinName + L"\\" + m_SkinIniFile + L"\""; command += m_SkinPath + L"\\" + m_SkinName + L"\\" + m_SkinIniFile + L"\"";
if (m_SkinPath == Rainmeter->GetSkinPath()) // If the skins are in the program folder start the editor as admin
if (Rainmeter->GetPath() + L"Skins\\" == Rainmeter->GetSkinPath())
{ {
LSExecuteAsAdmin(NULL, command.c_str(), SW_SHOWNORMAL); LSExecuteAsAdmin(NULL, command.c_str(), SW_SHOWNORMAL);
} }