Windows10 下 aria2 用 vbs 脚本不能启动

2016-01-17 18:38:52 +08:00
 dayupday

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

5422 次点击
所在节点    程序员
6 条回复
flynaj
2016-01-17 20:39:06 +08:00
可能是权限问题
Vicer
2016-01-17 22:41:49 +08:00
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
2016-01-17 23:18:02 +08:00
@Vicer 好的,我试试
dayupday
2016-01-18 00:10:05 +08:00
@Vicer 原来是路径的问题,不知道为什么 VBS 脚本不能识别“ program files ”这样的
Vicer
2016-01-18 08:02:20 +08:00
@dayupday 可是识别的
yeeyeung
2016-03-26 20:32:56 +08:00
我也是……放在了 program files 下不能识别……所以移出去就好了么?
谢谢 po 主哈哈

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/251388

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX