2012 年五月
« 四    
 12345
6789101112
13141516171819
20212223242526
2728293031  
  • Posts Tagged ‘2003’

    Windows添加用户、建立目录、建立虚拟主机的脚本

    dim input_username,input_password
    dim input
    Dim domain_root = “d:\freehost\”

    input_username=InputBox(“自动创建用户名”&vbCr&vbCr&” 本程序将根据你输入的用户名和密码新建帐号。”&vbCr&vbCr&”请输入用户名:”,”帐号创建工具”,”")
    If input_username=”" Then wscript.quit()
    input_password=InputBox(“自动创建用户名”&vbCr&vbCr&” 本程序将根据你输入的用户名和密码新建帐号。”&vbCr&vbCr&”请输入密码:”,”帐号创建工具”,”")
    If input_password=”" Then wscript.quit()

    Set ws=CreateObject(“wscript.shell”)
    temp_CreateUser_Script = “net user ” &input_username &” ” &input_password &” /add”
    temp_ChangeGroup_Script1 = “net localgroup users ” &input_username &” /del”
    temp_ChangeGroup_Script2 = “net localgroup guests ” &input_username &” /add”

    ws.run temp_CreateUser_Script
    ws.run temp_ChangeGroup_Script1
    ws.run temp_ChangeGroup_Script2

    temp_mkdir = “mkdir ” &domain_root &input_name

    ‘If ! Err Then
    MsgBox(“已经成功创建” &input_username &”;下面将开始创建IIS站点,请输入需要绑定的域名”)
    input_iisDomain = InputBox(“IIS站点创建工具”&vbCr&vbCr&” 本程序将自动创建IIS站点。”&vbCr&vbCr&”请输入需要绑定的域名:”,”IIS站点创建工具”,”")
    If input_iisDomain=”" Then wscript.quit()
    temp_createIISsite = “iisweb.vbs /s ghitr-2003ee /u “& input_username &” /p ” & input_password &” /create d:\freehost\”&input_username &”\web “”"&input_username&”_”&input_iisDomain&”"”" & ” /d ” &input_iisDomain & “”
    MsgBox(temp_createIISsite)
    ws.run temp_createIISsite

    input_quota = InputBox(“自动设置空间大小”&vbCr&vbCr&” 自动设置空间大小(单位为MB),即1G 输入 1024.如果100M请输入 100.”&vbCr&vbCr&”请输入空间大小(单位为M)”,”自动设置空间大小”,”")
    If Not IsNumeric Then
    MsgBox(“输入的空间大小错误”)
    wscript.quit()
    End if
    temp_quota = “cmd.exe /k fsutil quota modify d: ” &input_quota * 0.9 * 1048576 &” “& input_quota * 1 * 1048576 &” “& input_username
    MsgBox(temp_quota)
    ws.run temp_quota
    ‘Else
    ‘ MsgBox(“创建用户失败”)
    ‘End If

    ’1字节

    ’1GB=1024MB=1048576KB=1073741824B
    ’1MB=1024KB=1048576B
    ’1KB=1024B
    ‘增加自动创建目录功能
    ‘修正IIS创建时使用的用户名和密码

    IPv6 的RDNS搭建、测试成功。

        经过一段时间的摸索。终于把基于Windows Server +DNs server 的 IPV6 Rdns搭建起来了。

     

    C:\>tracert -6 vs1.ghitr.com

    Tracing route to vs1.ghitr.com [2001:470:1f05:819::2]
    over a maximum of 30 hops:

      1   311 ms   325 ms   301 ms  2001:5c0:1000:b::5786
      2   411 ms   403 ms   399 ms  ix-0-0.224.mcore4.MTT-Montreal.ipv6.as6453.net [2001:5a0:300::5]
      3   597 ms   479 ms   795 ms  if-12-3.mcore3.MTT-Montreal.ipv6.as6453.net [2001:5a0:300:100::21]
      4   421 ms   739 ms   377 ms  POS13-0.mcore4.NYY-NewYork.ipv6.as6453.net [2001:5a0:300:100::2]
      5   615 ms   643 ms   603 ms  POS5-0.mcore4.NJY-Newark.ipv6.as6453.net [2001:5a0:f00:100::1]
      6   604 ms   585 ms   331 ms  10gigabitethernet4-2.core1.nyc4.he.net [2001:504:0:6::6939:1]
      7   384 ms   399 ms   377 ms  10gigabitethernet5-3.core1.lax1.he.net [2001:470:0:10e::1]
      8   565 ms   763 ms   679 ms  10gigabitethernet1-3.core1.pao1.ipv6.he.net [2001:470:0:34::1]
      9   613 ms   553 ms   389 ms  10gigabitethernet1-4.core1.fmt2.ipv6.he.net [2001:470:0:30::1]
    10   390 ms   392 ms   405 ms  gige-gbge0.tserv3.fmt2.ipv6.he.net [2001:470:0:45::2]
    11   606 ms   783 ms   577 ms  yangybcy-1-pt.tunnel.tserv3.fmt2.ipv6.he.net [2001:470:1f04:819::2]
    12   588 ms   609 ms   605 ms  ipv6.server.ghitr.com [2001:470:1f05:819::2]

    Trace complete.

     

     

     

    IIS上启用Gzip压缩(HTTP压缩) 详解操作说明

    今天突然想起,我的Server还没有启用HTTP压缩。于是用站长工具一查。哇赛吓我一大跳。image

    原始文件太大了。看来在中国这个互联网国情来说,是很有必要压缩一下的了。

     

    说干就干,行动。

     

    第一步:

    添加WEB服务扩展。

     

    image

    扩展名这个可以自定义,我在这儿为了便于区分当然还是写GZIP了哟。

    Read the rest of this entry »

    在XP/2003下 接入IPV6

    此文仅适用于末实现IPV6覆盖的网络,不适合用于教育网!  且你的网络只能被NAT一次。

       IPV6已经开始流行了,可是在中国根本还没有哪个运营商将IPV6商用起来。这样就苦了我们这些尝鲜的人们了。  Windows7、Vista已经可以通过teredo接入到IPV6了,那们我们XP/2003是不是也可以使用这种方法接入IPV6网络呢?   当然可以了!   下面我们就开始吧。

     

     

    第一步:运行命令控制窗口。(开始–运行–CMD)

    第二步:输入以下内容:

    Read the rest of this entry »