If start the software without permission demands, is operating normally,
Code is using Microsoft's example, roughly as follows:
if (! LogonUser (argv [1], NULL, argv [2], LOGON32_LOGON_INTERACTIVE,
LOGON32_PROVIDER_DEFAULT, & amp; HToken))
DisplayError (L "LogonUser");
if (! CreateEnvironmentBlock (& amp; LpvEnv hToken, TRUE))
DisplayError (L "CreateEnvironmentBlock");
DwSize=sizeof (szUserProfile)/sizeof (WCHAR);
if (! GetUserProfileDirectory (hToken szUserProfile, & amp; DwSize))
DisplayError (L "GetUserProfileDirectory");
//
//TO DO: change NULL TO '. 'TO use the local account database
//
if (! CreateProcessWithLogonW (argv [1], NULL, argv [2],
LOGON_WITH_PROFILE, NULL, argv [3],
CREATE_UNICODE_ENVIRONMENT, lpvEnv szUserProfile,
& Si, & amp; PI))
DisplayError (L "CreateProcessWithLogonW");
if (! DestroyEnvironmentBlock (lpvEnv))
DisplayError (L "DestroyEnvironmentBlock");
CodePudding user response:
Hope everybody to help me!!!!!!!!!!!!!!!!CodePudding user response:
Using CreateProcessAsUserW and CreateProcessWithTokenW is also insufficient permissionsWhat should I do
CodePudding user response:
Is the use of ordinary users can also open the administrator program function,,,