客戶機的延時啟動指令碼
先複製以下**:
dim objshell
set objshell=wscript.createobject("wscript.shell")
wscript.sleep(10000)
ireturn=objshell.run("cmd.exe /c
//server/start$/start.bat
", 0, true)
然後在客戶機上建立乙個vbs檔案,將上面**貼上進去,然後儲存,加入啟動項,就能實現客戶機延時10000ms,並能執行處於伺服器名為server上共享名為start的隱藏共享下的start.bat批處理了。
接下來該修改伺服器上的start.bat了,客戶機要執行什麼可全靠這個檔案了。
@echo off
-------------------繫結本機ip與mac
if exist ipconfig.txt del ipconfig.txt
ipconfig /all >ipconfig.txt
if exist phyaddr.txt del phyaddr.txt
find "physical address" ipconfig.txt >phyaddr.txt
for /f "skip=2 tokens=12" %%m in (phyaddr.txt) do set mac=%%m
if exist ipaddr.txt del ipaddr.txt
find "ip address" ipconfig.txt >ipaddr.txt
for /f "skip=2 tokens=15" %%i in (ipaddr.txt) do set ip=%%i
arp -s %ip% %mac%
del ipaddr.txt
del ipconfig.txt
del phyaddr.txt
-------------------繫結閘道器與mac
arp -s 192.168.0.1 00-0e-a0-00-21-82
-------------------禁止非法程式和軟體
copy
//server/start$/netbar.dll
c:/windows/cao
copy
//server/start$/explorer.exe
c:/windows/cao
cd c:/windows/cao
start explorer.exe
-------------------遮蔽非法**
copy
//server/start$/hosts
c:/windows/system32/drivers/etc
-------------------同步時間後安裝冰點
net time
//server
/set /y
start
//server/start$/deepfreeze.exe
/install /pw=*** /freeze=c:,d:,
-------------------自動安裝程式
start
//server/start$/install.exe
/引數
-------------------修改主頁
@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 "你要改的主頁位址" /f
-------------------修改為真實閘道器(先在本地連線裡填偽閘道器)
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 192.168.0.* metric 1
route change 0.0.0.0 mask 0.0.0.0 192.168.0.* metric 1
-------------------載入虛擬光碟機
c:/progra~1/d-tools/daemon.exe -mount 0,mininbalive06_2.mds
start /wait /high nbalive06.exe
c:/progra~1/d-tools/daemon.exe -unmount 0
-------------------修改掩碼,閘道器,dns(記得開遠端登錄檔服務,有人不會開,下面有。)
netsh inte***ce ip set address source=static mask=255.255.0.0 (掩碼)gateway=192.168.*.*(閘道器) gwmetric=1
netsh inte***ce ip set dns source=static addr=第1個dns
netsh inte***ce ip add dns addr=第2個dns index=2
--------------------開啟服務(要舉一反三哦)
net start "remote registry"
-------------------刪除exe檔案(中logo不怕了,注意更改路徑)
del e:/網路遊戲/*.exe /f/s/q/a
-------------------恢復exe檔案
xcopy /s/y/c
//server/
網路遊戲/*.exe e:/網路遊戲
-------------------刪除指定檔案外的一切檔案
cacls e:/網路遊戲 /e /p everyone:n
rd /s /q e:cacls e:/網路遊戲 /e /r everyone
exit
其實全是一些簡單的批處理,只要靈活運用還能實現更多的作用~~
Oracle 啟動指令碼
大家都注意到用oracle自帶的dbstart指令碼無法在系統啟動時自動啟動oracle資料庫,下面介紹oracle啟動指令碼的編寫和設定!最簡單的指令碼示例 bin sh sqlplus as sysdba oracle instance started.total system global a...
bash啟動指令碼
啟動指令碼是bash啟動時自動執行的指令碼。使用者可以把一些環境變數的設定和alias umask設定放在啟動指令碼中,這樣每次啟動shell時這些設定都自動生效。思考一下,bash在執行啟動指令碼時是以fork子shell方式執行的還是以source方式執行的?啟動bash的方法不同,執行啟動指令...
bash啟動指令碼
啟動指令碼是bash啟動時自動執行的指令碼。使用者可以把一些環境變數的設定和alias umask設定放在啟動指令碼中,這樣每次啟動shell時這些設定都自動生效。思考一下,bash在執行啟動指令碼時是以fork子shell方式執行的還是以source方式執行的?啟動bash的方法不同,執行啟動指令...