Board logo

标题: 请高手帮忙转成vbs [打印本页]

作者: zxxhwlkj     时间: 2007-9-29 10:33    标题: 请高手帮忙转成vbs

@echo off
echo. 请输入瑞星升级服务器的IP 如:192.168.1.100
echo.
echo.
set ip=
if exist rav.exe set name=rav
if exist rfwmain.exe set name=rfw
echo echo off >smartup.inf
echo set server1=\\%ip%\rising$\%name%\update\ >>smartup.inf
exit
作者: wudixin96     时间: 2007-9-29 10:47

Dim fso,name,f,ip
ip=InputBox("请输入瑞星升级服务器的IP 如:192.168.1.100","输入","192.168.1.100")
ip=Trim(ip)
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists("rav.exe")) Then name="rav"
If (fso.FileExists("rfwmain.exe")) Then name="rfw"
Set f = fso.CreateTextFile("smartup.inf", True)
f.WriteLine("echo off")
f.WriteLine("set server1=\\"&ip&"\rising$\"&name&"\update\")
f.Close
set fso=nothing
set f=nothing