Board logo

标题: 如何用VBS做进度框 [打印本页]

作者: huanglsh     时间: 2007-8-4 18:46    标题: 如何用VBS做进度框

On Error Resume Next
serverip="192.168.1.245"
Set oshell= CreateObject("WScript.Shell")
oshell.run "iscsicli AddTargetPortal "&serverip&" 3260",0,1
oshell.run "iscsicli LoginTarget iqn.2005-09.com.ackasia.iscsi:0 T * * * * * * * * * * * * * * * 0",0,1
wscript.sleep 13000
oshell.run ("%comspec% /c echo select disk 1 >c:\temp.txt"),0,True
oshell.run ("%comspec% /c echo select partition 1 >>c:\temp.txt"),0,True
oshell.run ("%comspec% /c echo remove >>c:\temp.txt"),0,True
oshell.run ("%comspec% /c echo assign letter=Z >>c:\temp.txt"),0,True
oshell.run ("%comspec% /c echo exit >>c:\temp.txt"),0,True
wscript.sleep 1000
oshell.run ("%comspec% /c diskpart.exe /s c:\temp.txt"),0,True
Wscript.quit
这是ISCSI连接服务器加指定盘符的代码,可用!
我想加点美观方面的.
执行时有这个框出来

完成后消失打开一个执行文件!

谁帮看下可不可行!

[ Last edited by bjsh on 2007-8-7 at 08:57 AM ]
作者: huanglsh     时间: 2007-8-6 17:28
怎么没人帮忙看下呀.......
我自己顶下!