|
VBS脚本应用-改本机网络相关信息(1)
\'注意: \'本程序中使用了Scripting.FileSystemObject对象 \'有的杀毒软件可能禁用该对象 Dim ComputerName \'定义计算机名 Dim WorkGroup \'定义工作组 Dim IPAddress \'定义IP地址 Dim Gateway \'定义网关 Dim NetMask \'定义子网掩码 Dim NameServer \'定义DNS Dim CSCDKey \'定义反恐CDKey Dim WSH \'定义WScript.Shell对象 Dim FSO \'定义Scripting.FileSystemObject对象 Dim OPName \'定义操作系统名 Dim IPFile,CDKeyFile,WinNTFile \'定义反恐CDKey和IP地址的文件对象 Dim IPList,CDKeyList,WinNtCFG \'定义网络配置文件 Dim Meteor Dim ComputerNameNum,IPAddressFormat,ComputerNameFormat \'定义其他变量 Dim Buf,NamePart,IPPart,i,j OPName = "Microsoft Windows 9x" \'设置默认为Microsoft Windows 9x
IPList = "killer.cfg" \'设置网络设置配置文件, ###可自定义### CDKeyList = "CSCDKEY.TXT" \'反恐CDKEY列表文件文件,###可自定义### WinNTCFG = "WinNT.cfg"
ComputerNameNum = 0
\'ON Error Resume Next Set FSO = CreateObject("Scripting.FileSystemObject") \'创建文件系统对象 Set WSH = WScript.CreateObject("WScript.Shell") \'创建WScript.Shell对象 IF NOT FSO.FileExists(IPList) THEN MSGBox " 没有发现IP地址列表文件:"&IPList&VBCrLf&"未改动任何设置",48,"XP工作站设置程序"
|