'提权运行软件，就是管理员方式运行软件
'返回进程ＩＤ
#Include Once "win/shellapi.bi"
Function StartElevatedProcess(ExeFile as String, lpParameters as String) as HANDLE  '
   Dim Sei as shellexecuteinfoA
   Dim as ZString * Max_path szVerb,szExecutable,szCmdLine
   szExecutable = ExeFile
   szCmdLine = lpParameters      '可选。运行/打开程序的参数
   szVerb = "runas"
   Sei.cbSize = SizeOf(shellexecuteinfo)         '结构大小，以字节为单位。
   Sei.fMask = SEE_MASK_NOCLOSEPROCESS    '一个标志数组，用来设置其他成员的有效性。
   Sei.lpFile = VarPtr(szExecutable)
   Sei.lpParameters = VarPtr(szCmdLine)   '可选。运行/打开程序的参数
   Sei.nShow = SW_SHOW ' %SW_HIDE
   Sei.lpVerb = VarPtr(szVerb)
   ShellExecuteExA(@Sei)
   Function = Sei.hProcess
End Function