注册表-批处理-VBS之间的相互结合应用第1/2页
2019-10-26 18:00:17
供稿:网友
不懂注册表、VBS、批处理不要紧,只要会学、会吸收别人的精华,会查找资料,|论坛|百度|GOOGLE|,然后能用好,就非常不错了
贴一些搜集的文字放到这吧。(绿色是标题, 蓝色的是原作者,红色的部分就是需要修改的部分,根据你自己的实际情况修改)
======打开迅闪菜单的同时连接虚拟磁盘的VBS======
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run ("c:/client/新调用.exe",0,true)
Return = WshShell.Run ("iscsicli AddTargetPortal 192.168.0.9 3260",0,true)
Return = WshShell.Run ("iscsicli LoginTarget iqn.2005-02.com.ricecake.iscsi:00 T * * * * * * * * * * * * * * * 0",0,true)
Set WshShell = Nothing
======开机VBS调用远程批处理(延时+无黑屏后台运行的效果)======
DIM objShell
set objShell=wscript.createObject("wscript.shell")
WScript.Sleep(10000)
iReturn=objShell.Run("cmd.exe /C //server/E/123.bat", 0, TRUE)
======修改IE状态栏显示字符的注册表(感谢雷锋战友和15楼的ciwzero )======
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Internet Settings/Zones/3]
@=""
"DisplayName"="XX网吧"
====== 批处理获得本机的IP和MAC地址然后进行绑定(zzlike 写的)======@echo off
for /f "tokens=1* delims=:" %%i in ('ipconfig /all^|find /i "Physical Address"') do set mac=%%j
for /f "tokens=1* delims=:" %%i in ('ipconfig /all^|find /i "IP Address"') do set ip=%%j
arp -s %ip:~1% %Mac:~1%
======强制刷新组策略和注册表======
xp/2003命令
gpupdate /force
2k命令
secedit /refreshpolicy machine_policy /enforce
====== 批处理修改IE主页(斑竹dseation的帖上搞来的)======
@reg delete "HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/Main" /v "Start Page" /f
@reg add "HKEY_CURRENT_USER/Software/Microsoft/Internet Explorer/Main" /v "Start Page" /d "http://192.168.0.250" /f
======解除禁止下载的几种方法======
VBS代码:
DIM WSH
SET WSH=WSCRIPT.CreateObject("WSCRIPT.SHELL")
WSH.POPUP("本程序的作用是解决无法下载的问题")
WSH.Regwrite"HKCU/Software/Microsoft/Windows/CurrentVersion/Internet Settings/Zones03",0,"REG_DWORD"
WSH.POPUP("现在您可以下载程序了!")
JS代码:
VAR WSHShell=WSCRIPT.CREATOBJEt("WSCRIPT.SHELL");