帮我翻译一下这个VBS 详细解说

来源:百度知道 编辑:UC知道 时间:2024/05/26 14:47:23
dim fso,oshell,command1,command2,path
path = "F:\\工具\IP\IP属性.exe"
command1 = "E:\\eaisone\Ip\2KXP.exe"

command2="F:\\工具\IP\IP属性.exe"
set oshell = wscript.createobject ("wscript.shell")
set fso = createobject("scripting.filesystemobject")
if (fso.fileexists(path)) then

oshell.run command2
else
oshell.run command1
end if

set oshell=nothing

set fso=nothing

dim fso,oshell,command1,command2,path
*对上述变量fso,oshell,command1,command2,path 进行定义;

path = "F:\\工具\IP\IP属性.exe"
*path路径变量的值为“F:\\工具\IP\IP属性.exe”,即表示“存储在F盘工具文件夹下的IP文件夹下的名为"IP属性"”的可执行文件;

command1 = "E:\\eaisone\Ip\2KXP.exe"
*command1路径变量的值为"E:\\eaisone\Ip\2KXP.exe"的文件,即E盘文件夹eaisone下名为Ip的子文件夹下的名为“2KXP”的可执行文件。

command2="F:\\工具\IP\IP属性.exe"
*command2变量值为"F:\\工具\IP\IP属性.exe",即F盘下IP文件夹下的名为“IP属性”的可执行文件;

set oshell = wscript.createobject ("wscript.shell")
*设置oshell值为wscript.createobject ("wscript.shell") ;

set fso = createobject("scripting.filesystemobject")
*设置fso值为createobject("scripting.filesystemobject") ;

if (fso.fileexists(path)) then
*若fso.fileexists的路径值符合设定值,则运行

oshell.run co