,因为如果我在另一台计算机上运行这个 vbscript 而我的 vbs 不知道用户 DIR 文件怎么办
Option Explicit
DIM Jed
Set Jed = CreateObject("Scripting.FileSystemObject")
If (Jed.FileExists("%homepath%/Desktop/jed.vbs")) Then
WScript.Echo("File exists!")
WScript.Run(jed.vbs)
Else
WScript.Echo("File does not exist!")
End If
WScript.Quit()
因为我试过 If (Jed.FileExists("%homepath%/Desktop/jed.vbs"))