V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
dayupday
V2EX  ›  程序员

Windows10 下 aria2 用 vbs 脚本不能启动

  •  
  •   dayupday · Jan 17, 2016 · 5858 views
    This topic created in 3754 days ago, the information mentioned may be changed or developed.

    试着用
    CreateObject("WScript.Shell").Run "D:\Progra~1\aria2\aria2c.exe --conf-path=aria2.conf",0
    这个脚本无窗口启动 aria2 ,结果一直包系统找不到指定的文件

    6 replies    2016-03-26 20:32:56 +08:00
    flynaj
        1
    flynaj  
       Jan 17, 2016 via Android
    可能是权限问题
    Vicer
        2
    Vicer  
       Jan 17, 2016   ❤️ 1
    For each ps in GetObject("winmgmts:\\.\root\cimv2:win32_process").instances_
    if ps.exeCutablePath="C:\ProgramData\Aria2c\aria2c.exe" then
    CreateObject("WScript.Shell").Run "%ProgramData%\Aria2c\index.html",0
    WScript.quit
    end if
    next
    CreateObject("WScript.Shell").Run "C:\ProgramData\Aria2c\aria2c.exe --conf-path=C:\ProgramData\Aria2c\aria2c.conf",0

    我使用的开机自启脚本加 YAAW 快捷方式,你改下路径。
    dayupday
        3
    dayupday  
    OP
       Jan 17, 2016
    @Vicer 好的,我试试
    dayupday
        4
    dayupday  
    OP
       Jan 18, 2016
    @Vicer 原来是路径的问题,不知道为什么 VBS 脚本不能识别“ program files ”这样的
    Vicer
        5
    Vicer  
       Jan 18, 2016 via iPhone
    @dayupday 可是识别的
    yeeyeung
        6
    yeeyeung  
       Mar 26, 2016
    我也是……放在了 program files 下不能识别……所以移出去就好了么?
    谢谢 po 主哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1194 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 18:00 · PVG 02:00 · LAX 11:00 · JFK 14:00
    ♥ Do have faith in what you're doing.