• 请不要在回答技术问题时复制粘贴 AI 生成的内容
dayupday
V2EX  ›  程序员

Windows10 下 aria2 用 vbs 脚本不能启动

  •  
  •   dayupday · Jan 17, 2016 · 6210 views
    This topic created in 3956 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
    flynaj
    Jan 17, 2016 via Android
    1
    可能是权限问题
    Vicer
    Vicer
    Jan 17, 2016❤️1
    2
    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
    dayupday
    OP
    Jan 17, 2016
    3
    @Vicer 好的,我试试
    dayupday
    dayupday
    OP
    Jan 18, 2016
    4
    @Vicer 原来是路径的问题,不知道为什么 VBS 脚本不能识别“ program files ”这样的
    Vicer
    Vicer
    Jan 18, 2016 via iPhone
    5
    @dayupday 可是识别的
    yeeyeung
    yeeyeung
    Mar 26, 2016
    6
    我也是……放在了 program files 下不能识别……所以移出去就好了么?
    谢谢 po 主哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4153 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 09:22 · PVG 17:22 · LAX 01:22 · JFK 04:22
    ♥ Do have faith in what you're doing.