|
本帖最后由 gogo023 于 2010-9-26 14:45 编辑
#include <LocalSecurityAuthority.au3>
_RaiseToSystem()
Func _RaiseToSystem()
Local $sApp, $sArg, $hToken, $pUserThread, $pUserLogged
$pUserLogged = _LookupAccountName(_LsaGetUserName(False))
$hToken = _OpenProcessToken(-1)
$pUserThread = _LookupAccountName(_GetTokenUser($hToken))
_LsaCloseHandle($hToken)
If _EqualSid($pUserLogged, $pUserThread) Then
If @Compiled Then
$sApp = @ScriptFullPath
$sArg = " " & $CmdLineRaw
Else
$sApp = @AutoItExe
$sArg = " " & FileGetShortName(@ScriptFullPath) & " " & $CmdLineRaw
EndIf
_CreateProcessAsSystem($sApp, $sArg, "Winlogon.exe")
Exit(_HeapFree($pUserLogged) or _HeapFree($pUserThread))
EndIf
Return _HeapFree($pUserLogged) or _HeapFree($pUserThread)
EndFunc ;==>_RaiseToSystem
pusofalse 大哥写的这里的这段代码。提升出来的系统进程,一样的会在进程管理器里被结束掉。 |
|