注册 | 登录 | 设为首页 | 加入收藏
您当前的位置:飞翔学院-IT中国 → 编程开发Asp → 文章内容

使用FileSystemObject,举个例子给你

作者:IT 来源:不详 发布时间:2007-9-2 0:20:11
自己看一下,应该比较简单

sub WriteIni(sRoot,sUser,sPassword,sQuota)
Const ftpservdir="C:\Program Files\Serv-U"
dim str(7),sFullPath
if isnull(sQuota) then sQuota=20480
sFullPath=sRoot & "\" & sUser
Set FO=CreateObject("Scripting.FileSystemObject")
Set TF=FO.OpenTextFile( ftpservdir & "\Serv-U.INI", 8, TRUE)
str(0)="[USER=" & sUser & "]"   'UserName
str(1)="Password=" & sPassword     'Password
str(2)="HomeDir=" & sFullPath 'Directory
str(3)="ChangePassword=YES"   
str(4)="QuotaEnable=YES"
str(5)="QuotaMaxCurrent=" & cstr(sQuota) & ",0" 'Quota
str(6)="Access1=" & sFullPath & ",ARWMCDLP" 'Directory
str(7)="Timeout=5" 'TimeOut of Idle
dim i
for i=0 to 7
TF.writeline cstr(str(i))
next
TF.Close
end sub
http://www.itcnw.com/
  • 打印文档
  • 推荐好友
  • 返回顶部
  • 增大字体
  • 减少字体
关于本站 | 工作机会 | 合作网站 | 广告服务 | 市场合作| 联系我们 | 抽奖活动
版权所有: 武汉威俊科技有限公司 Copyright 2005-2007 www.ITCNW.COM All rights reserved