|
发表于 2011-1-24 09:19:43
|
显示全部楼层
获取开机启动项:
http://www.autoitx.com/forum.php ... =%C6%F4%B6%AF%CF%EE
获得进程运行路径:
#include <WinAPI.au3>
$Process = "lsass.exe"
$FullPath = _GetProcPath($Process)
If Not @error Then MsgBox(0, "Process Full Path", "Process = " & $Process & "Path = " & $FullPath)
Func _GetProcPath($Process_In)
Local $iProc, $hModule, $hProc, $stString, $iResult, $sPath
$iProc = ProcessExists($Process)
If Not $iProc Then Return SetError(1, 0, "")
$hModule = 0
$hProc = _WinAPI_OpenProcess(BitOR(0x0400, 0x0010), False, $iProc)
$stString = DllStructCreate("char[260]")
$iResult = DllCall("Psapi.dll", "dword", "GetModuleFileNameEx", _
"hwnd", $hProc, _
"hwnd", $hModule, _
"ptr", DllStructGetPtr($stString), _
"dword", 260)
$sPath = DllStructGetData($stString, 1)
Return $sPath
EndFunc |
|