Location: Symbol Reference > Files > JwsclElevation.pas
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
JwsclElevation.pas

Project JEDI Windows Security Code Library (JWSCL) 

Contains structures to support vista elevation.

Not compilable by FreePascal/Lazarus. Missing TTypedComObjectFactory.

The Original Code is JwsclElevation.pas.

Christian Wimmer 

The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ 

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. 

Alternatively, the contents of this file may be used under the terms of the GNU Lesser General Public License (the "LGPL License"), in which case the provisions of the LGPL License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the LGPL License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the LGPL License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the LGPL License. 

For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html

 
Name 
Description 
 
TJwElevationClassFactory provides a registration for a typed com object. It also creates the necessary registry entries. 
 
Name 
Description 
 
JwCheckSuRunStatus checks whether SuRun is availab.e SuRun is a UAC like clone that runs in Win2000, XP and newer.
StatusData : This out parameter returns status information of SuRun. 
 
JwCoCreateInstanceAsAdmin creates an out of process COM object with administrator rights and returns it in ObjectInterface. If the current is already elevated, the function just creates an COM object and returns it; otherwise the elevation dialog will be shown.
The COM class must be registered in a COM type library. The executable which call this function must contain a manifest that defines "asInvoker" as the requested execution level.  
 
JwCoCreateInstanceAsEx creates an out of process COM object and returns it in ObjectInterface. If the current is already elevated, the function just creates an COM object and returns it; otherwise the elevation dialog will be shown.
The COM class must be registered in a COM type library. The executable which call this function must contain a manifest that defines "asInvoker" as the requested execution level.  
 
JwCoCreateInstanceAsHighest creates an out of process COM object with highest possible rights and returns it in ObjectInterface. If the current is already elevated, the function just creates an COM object and returns it; otherwise the elevation dialog will be shown.
The COM class must be registered in a COM type library. The executable which call this function must contain a manifest that defines "asInvoker" as the requested execution level.  
 
JwCoGetClassFactoyAsAdmin creates an out of process COM class factory object with administrator rights and returns it in ObjectInterface. If the current is already elevated, the function just creates an COM object and returns it; otherwise the elevation dialog will be shown.
The COM class must be registered in a COM type library. The executable which call this function must contain a manifest that defines "asInvoker" as the requested execution level.
 
 
JwElevateProcess is much like JwShellExecute but also may work on Windows 2000 and XP without UAC. Instead of UAC it uses SuRun if installed. On Vista/2008 and newer it tries to use UAC. If UAC and SuRun is not available it falls back to ShellExecute with the RunAs verb. In this case a dialog pops up the receives a username and password to use (usually Administrator). If no UI is allowed the function can use another method that receives the username and password from a generated even method (OnElevationGetCredentials). In this case the process is started using Windows Secondary Logon... more 
 
JwShellExecute runs a process with elevated privileges in Windows Vista. If the current is already elevated the function simply opens the given filename. The verb of shellexecute cannot be changed.
This function only works on Windows Vista and newer OS versions.
 
Copyright (c) 2010. All rights reserved.
This help was created by Doc-O-Matic sponsored by toolsfactory software inc.
What do you think about this topic? Send feedback!