Location: Symbol Reference > Functions > JwShellExecute Function
JWSCL Documentation
ContentsIndexHome
PreviousUpNext
JwShellExecute Function
Pascal
function JwShellExecute(const hWnd: HWND; FileName: TJwString; Parameters: TJwString; Directory: TJwString; ShowCmd: Integer; Flags: TJwShellExecuteFlags = [sefNoClosehProcess]): HANDLE;

The return value contains the instance of the newly created app. The function returns before the new application has started therfore the app can fail. If ShellExecute determines an error the return value is 0 and an exception is raised.

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. 

 

Exceptions 
Description 
will be raised if a call to ShellExecuteEx failed EJwsclUnsupportedWindowsVersionException will be raised if the flag sefIgnoreElevationIfNotAvailable is set and UAC is not available 
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!