好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > vbs 讀寫注冊表之系統(tǒng)啟動項添加與刪除

vbs 讀寫注冊表之系統(tǒng)啟動項添加與刪除

熱門標(biāo)簽:哪里有便宜的地圖標(biāo)注公司 東營快遞外呼系統(tǒng) 除了地圖標(biāo)注還有這種生意嗎 百度地圖標(biāo)注點距離代碼 如何用機器人進行電銷 齊齊哈爾高德地圖標(biāo)注店 神行者美術(shù)館地圖標(biāo)注 地圖標(biāo)注政府哪個部門管 佛山真人電銷機器人廠家

核心vbs代碼

'變量定義
Dim writeName,writeValue,fileName,regLoaction,regApp

'創(chuàng)建注冊表編輯器對象
Set regApp=WScript.CreateObject("WScript.Shell")

'配置文件名
fileName="FullScan.txt"
'輸入鍵名
writeName="xiaoqiang"
'輸入鍵值
writeValue="test"

'************************腳本運行區(qū)間********************************

'根據(jù)配置文件獲取注冊表路徑數(shù)組
regLoaction=getRegPathArray(getFileText(fileName))

'寫入注冊表
write regLoaction,writeName,writeValue

'讀取寫入的鍵值 生成并生成結(jié)果文件
read regLoaction,writeName

'************************函數(shù)定義********************************
'讀注冊表
Function read(regLoaction,writeName)
 Dim returnStrArray(),j
 j=0
 If writeName="" or writeValue="" then
  msgbox "錯誤!!請輸入鍵名和鍵值"
 else
  for i=0 to ubound(regLoaction)
 ReDim Preserve returnStrArray(j) 
   regPath=regLoaction(i)"\"writeName
   returnStrArray(j)=regPath"? "regApp.RegRead(regPath)
   j=j+1
  Next
 End if
 writeResult returnStrArray
End Function

'寫入注冊表
Function write(regLoaction,writeName,writeValue)
 If writeName="" or writeValue="" then
  msgbox "錯誤!!請輸入鍵名和鍵值"
 else
  for i=0 to ubound(regLoaction)
 regApp.RegWrite regLoaction(i)"\"writeName,writeValue
  Next
 End if
End Function

'輸出結(jié)果文件
sub writeResult(contentArray)
 Const ForReading = 1, ForWriting = 2
 Dim fso,f,returnStrArray(),i
 Set fso = CreateObject("Scripting.FileSystemObject")
 Set f = fso.OpenTextFile("result.txt", 2,true)
 for i=0 to ubound(contentArray)
 f.writeline(contentArray(i))
 Next
 f.close()
End Sub

'得到注冊表路徑數(shù)組
Function getRegPathArray(sourceArray)
 Dim head,returnStrArray(),j
 j=0
 for i=0 to ubound(sourceArray)
  If sourceArray(i)="[HKEY_LOCAL_MACHINE]" then
 head="HKLM"
  elseif sourceArray(i)="[HKEY_USERS]" then
   head="HKEY_USERS\.DEFAULT"
  elseif sourceArray(i)="[HKEY_CURRENT_USER]" then
   head="HKCU"
  elseif sourceArray(i)="[HKEY_CLASSES_ROOT]" then
   head="HKCR"
  elseif sourceArray(i)="[HKEY_CURRENT_CONFIG]" then
   head="HKEY_CURRENT_CONFIG"
  else
   ReDim Preserve returnStrArray(j)
   str=headsplit(sourceArray(i),"=")(1)
   returnStrArray(j)=str
   j=j+1
  End If
 Next
 getRegPathArray=returnStrArray
End Function

'得到文件內(nèi)容存入數(shù)組
Function getFileText(fileName)
 Const ForReading = 1, ForWriting = 2
 Dim fso,f,returnStrArray(),i
 Set fso = CreateObject("Scripting.FileSystemObject")
 Set f = fso.OpenTextFile(fileName, 1)
 i=0
 do while f.atendofstream>true
  ReDim Preserve returnStrArray(i)
  returnStrArray(i)=f.readline()
  i=i+1
 loop
 f.close()
 getFileText=returnStrArray
End Function

//配置文件

FullScan.txt

[HKEY_LOCAL_MACHINE]
1=\Software\Microsoft\Windows\CurrentVersion\Run
2=\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run\

3=\Software\Microsoft\Windows\CurrentVersion\RunOnce\

4=\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce\

5=\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
6=\Software\Microsoft\Windows\CurrentVersion\Policies\System\Shell\

7=\Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad\

8=\Software\Policies\Microsoft\Windows\System\Scripts\

[HKEY_CURRENT_USER]
1=\Software\Microsoft\Windows\CurrentVersion\Run
2=\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run\

3=\Software\Microsoft\Windows\CurrentVersion\RunOnce\

4=\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce\

5=\Software\Microsoft\Windows\CurrentVersion\RunOnceEx
6=\Software\Microsoft\Windows\CurrentVersion\Policies\System\Shell\

7=\Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad\

8=\Software\Policies\Microsoft\Windows\System\Scripts\

運行后得到result.txt

HKLM\Software\Microsoft\Windows\CurrentVersion\Run\xiaoqiang? test
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run\\xiaoqiang? test
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce\\xiaoqiang? test
HKLM\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce\\xiaoqiang? test
HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\xiaoqiang? test
HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\Shell\\xiaoqiang? test
HKLM\Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad\\xiaoqiang? test
HKLM\Software\Policies\Microsoft\Windows\System\Scripts\\xiaoqiang? test
HKCU\Software\Microsoft\Windows\CurrentVersion\Run\xiaoqiang? test
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\Run\\xiaoqiang? test
HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnce\\xiaoqiang? test
HKCU\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce\\xiaoqiang? test
HKCU\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\xiaoqiang? test
HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\System\Shell\\xiaoqiang? test
HKCU\Software\Microsoft\Windows\CurrentVersion\ShellServiceObjectDelayLoad\\xiaoqiang? test
HKCU\Software\Policies\Microsoft\Windows\System\Scripts\\xiaoqiang? test

注冊表中的值

以下是腳本之家小編補充

運行后就會發(fā)現(xiàn)在系統(tǒng)開始自動運行的一些啟動項加入了如上值,所以不建議普通用戶運行。

既然批量添加那么也可以批量刪除

將上面的vbs代碼中的

regApp.RegWrite regLoaction(i)"\"writeName,writeValue

替換為

regApp.RegDelete regLoaction(i)"\"writeName

發(fā)現(xiàn)直接運行不行,其實注冊表的刪除需要用管理員權(quán)限才可以。

怕有些新手不知道如何管理員權(quán)限運行vbs

其實右鍵cmd中看到 以管理員權(quán)限運行 打開 dos窗口,然后將vbs文件拖到這個dos窗口里面,回車運行即可

然后拖拉

回車后發(fā)現(xiàn),并沒有提示任何錯誤信息,從注冊表中看到,確定這個字段已經(jīng)沒了。完全解決。

標(biāo)簽:西安 湖州 邢臺 文山 海口 四平 鶴壁 銅川

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《vbs 讀寫注冊表之系統(tǒng)啟動項添加與刪除》,本文關(guān)鍵詞  vbs,讀寫,注冊表,之,系統(tǒng),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《vbs 讀寫注冊表之系統(tǒng)啟動項添加與刪除》相關(guān)的同類信息!
  • 本頁收集關(guān)于vbs 讀寫注冊表之系統(tǒng)啟動項添加與刪除的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 韩国电影免费在线播放观看| 免费精品录播大片黄满18周岁| 真实国产亂伦免费看日本山口| 国产一国产看免费高清片| 91在线看片一区国产| 99re这里只有精品国产精品| 浪货贱奴文| 一级a作爱全过程视频| 精品国内自产拍在线观看视频| 古代毛片大全集| 6080午夜一级毛片免费看| 含羞草媒体| 成人免费公开视频| 巜熟妇的荡欲伦交换4电影| 波多野结衣AV精品无码| 成人打一炮免费视频| 天堂2m跟天堂w的区别| 男男被猛男躁免费视频网站小蓝| 欧美AV人人妻AV人人爽成人网| 怡春院欧美杂交a| 9 1免费版下载安装安卓手机 | 国语对白做受???按摩| 浪货舒服吗好紧好多水np| 淑芬两腿间又痒又疼的原因| 成年免费大片黄在线观看app| 巨大一寸一寸挤进我身体里| 国模第六套私拍大尺度| 羞羞影院男女午夜爽爽影视| 国产精品国产亚洲精品看不卡 | 我的相亲对象是一个强硬的问题学生| 浪荡的叫床说的话| 免费精产国品一二三产区区别 | 妻子年轻出轨老了老公要离婚| 日本无翼乌全彩j奶无遮挡| 脔到哭蛇双根宫交H| 被迫肉体还债免费观看| 男女床上搞| 射死你天天日| 黄色软件免费下载大全| 五月综合激情视频在线观看| 99视频在线精品免费观看18|