2021年11月25日 星期四

delphi啟動外部程式執行結束 啟動外部程式 Winexec ShellExecute

 delphi啟動外部程式執行結束 啟動外部程式 Winexec ShellExecute 

Winapi.ShellAPI Winapi.Windows

 ShellExecute CreateProcess  ShellExecuteEx WaitForSingleObject

delphi shellexecuteex SW_SHOWNORMAL

 TShellExecuteInfo  

 WaitForSingleObject(ShExecInfo.hProcess,INFINITE); 

GetExitCodeProcess(ExecInfo.hProcess,ExitCode);

 createprocessasuser 

https://www.codeproject.com/Articles/19165/Vista-UAC-The-Definitive-Guide

Link_Create()
Link_CreateAsUser()
Link_CreateWithLogon()
Link_CreateWithToken()
Link_Destroy()
Link_CreateProcessA()
Link_CreateProcessW()
Link_ShellExecuteExA()
Link_ShellExecuteExW()
Link_ShellExecuteA()
Link_ShellExecuteW()
Link_LoadLibraryA()
Link_LoadLibraryW()
Link_SendData()
Link_GetData()
Link_SendFinalize()

CreateProcessElevatedA()
CreateProcessElevatedW()
CreateProcessAsUserElevatedA()
CreateProcessAsUserElevatedW()
CreateProcessWithLogonElevatedW()
CreateProcessWithTokenElevatedW()
SH_RegCreateKeyExElevatedA()
SH_RegCreateKeyExElevatedW()
SH_RegOpenKeyExElevatedA()
SH_RegOpenKeyExElevatedW()
SH_RegCloseKeyElevated()
ShellExecuteElevatedA()
ShellExecuteElevatedW()
ShellExecuteExElevatedA()
ShellExecuteExElevatedW()

Requesting Administrative Rights Requested Elevation Levels Elevation 

https://www.codeproject.com/Questions/182599/How-to-Run-a-Process-As-Admin

https://stackoverflow.com/questions/11586139/how-to-run-application-which-requires-admin-rights-from-one-that-doesnt-have-th

沒有留言: