用VBS脚本自动修改DNS。

Dim DNS1:DNS1 = "219.141.140.10" '//主DNS
Dim DNS2:DNS2 = "219.141.136.10" '//次DNS
  strWinMgmt="winmgmts:{impersonationLevel=impersonate}"
  Set SAWXY_NICS = GetObject( strWinMgmt ).InstancesOf("Win32_NetworkAdapterConfiguration")
For Each SAWXY_

Continue reading...

易游2008专用修改主页脚本

Dim iSetmenu:iSetmenu=1 
Dim fsobject,Setmenu,Baidurl,Setting,Globaldir 
'//================================= 
'//易游2008专用修改主页脚本 
'//版权所有:Samway's blog http://www.samxy.com
'//[HKEY_CLASSES_ROOT\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command] 
'//[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command] 
'//权限去掉,并把http://www.baidu.com/index.php?tn=request_pg字符串删除 
'//脚本创建:陶之11 
'//Copyright Samway.tao vip@Samxy.com
'//================================= 
Globaldir = "E:\UserData$\Globalconfig\" '//Globalconfig更新目录后面要保留"\" 
Setmenu = "SetMenu.dat" '//保留双引号,填写SetMenu.dat文件 
Baidurl = "http://www.baidu.com/index.php?tn=request_pg" '//保留双引号,百度广告的完全URL。 
Setting = "http://www.samxy.com" '//保留双引号,你要设置主页的URL。 
Set oShell = CreateObject("WScript.Shell") 
Set fsobject = CreateObject("Scripting.FileSystemObject") 
   SetMenuaddREGoShellObject = oShell.REGWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\Setmenu"_ 
,fsobject.GetFile(Wscript.ScriptFullName).ParentFolder.Path _ 
& "\" & _ 
WScript.ScriptName) 
    IF Not fsobject.FileExists(Globaldir&"Setmenu.bak") Then 
     TempbackupSetmenu = fsobject.Copyfile (Globaldir&Setmenu,Globaldir&"Setmenu.bak",true) 
    End IF 
Do While iSetmenu > 0   
  Set ReadSetmenuString = fsobject.OpenTextFile(Globaldir&Setmenu) 
   GetSetmenuString = ReadSetmenuString.Readall 
   ReadSetmenuString.Close 
   TempSetMenuString = Replace(GetSetmenuString,Baidurl,Setting) 
  Set ResSetmenuString = fsobject.Createtextfile(Globaldir&Setmenu) 
   ResSetmenuString.Write TempSetMenuString 
   ResSetmenuString.Close 
iCounter = iSetmenu + 1 
IF iCounter < 0 Then WScript.Quit 
WScript.Sleep(1000*10*6*10) 
Loop 
Set fsobject = Nothing 
WScript.Quit 

 

本脚本适合易游2008版本使用。其他版本请参照使用。
具体说明及完整代码下载地址:<#ZC_BLOG_HOST#>post/2010/11/92.html

使用方法:将脚本复制另存为

Continue reading...



about me

  • 陶之11's Blog Name:陶之11 OICQ:14779023 Site:Pao11.com

分类

快捷入口