Changeset 1718


Ignore:
Timestamp:
1/29/2010 12:35:31 AM (4 years ago)
Author:
lowjoel
Message:

When we have problems starting Eraser from the shell extension check the return code for ERROR_ELEVATION_REQUIRED; if we get that, then we should re-run the operation as an administrator.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6/ShellExt/CtxMenu.cpp

    r1675 r1718  
    954954                NULL, NULL, &startupInfo, &processInfo)) 
    955955            { 
     956                //Why did we fail? Is it because we have too many files 
    956957                if (GetLastError() == ERROR_FILENAME_EXCED_RANGE) 
    957958                    throw FormatString(LoadString(IDS_ERROR_TOO_MANY_FILES)); 
     959                 
     960                //Or if elevation is required for this operation 
     961                else if (GetLastError() == ERROR_ELEVATION_REQUIRED) 
     962                    return RunEraser(action, parameters, true, parent, show); 
     963 
     964                //Or otherwise? 
    958965                else 
    959966                    throw FormatString(LoadString(IDS_ERROR_MISC), FormatError().c_str()); 
Note: See TracChangeset for help on using the changeset viewer.