Some functions (like ExitWindowsEx) need a privilege (SE_SHUTDOWN_NAME) to be enabled to work properly. With the help of JWSCL this task is made very easy. JWSCL provides several ways to enable and disable privileges. Use the methods of TJwSecurityToken Use the function JWEnablePrivilege Use the interface IJwPrivilegeScope