找回密码
 加入
搜索
查看: 1490|回复: 2

[系统综合] 如何获取任意或特定的一个启动项程序的具体位置?

[复制链接]
发表于 2011-1-24 00:55:13 | 显示全部楼层 |阅读模式
开机启动里,有哪些程序,我怎么获取这个列表。
比如c:\dd\dd.exe   
这样具体的地址 而不是加了参数啊之类 的地址。我只想找到这个程序而已。

然后怎么提取任意一个,或特定的一个地址?

请兄弟姐妹们指教~~~
发表于 2011-1-24 09:15:06 | 显示全部楼层
读注册表,然后拆一下字符串
发表于 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
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 14:35 , Processed in 0.089376 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表