這篇文章給大家分享的是有關(guān)怎么用vbs檢查注冊(cè)表項(xiàng)的訪問(wèn)權(quán)限的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過(guò)來(lái)看看吧。
南昌網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián),南昌網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為南昌上1000+提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\成都外貿(mào)網(wǎng)站建設(shè)公司要多少錢(qián),請(qǐng)找那個(gè)售后服務(wù)好的南昌做網(wǎng)站的公司定做!const KEY_QUERY_VALUE = &H0001 const KEY_SET_VALUE = &H0002 const KEY_CREATE_SUB_KEY = &H0004 const DELETE = &H00010000 const HKEY_LOCAL_MACHINE = &H80000002 strComputer = "." Set StdOut = WScript.StdOut Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ strComputer & "\root\default:StdRegProv") strKeyPath = "SYSTEM\CurrentControlSet" oReg.CheckAccess HKEY_LOCAL_MACHINE, strKeyPath, KEY_QUERY_VALUE, bHasAccessRight If bHasAccessRight = True Then StdOut.WriteLine "Have Query Value Access Rights on Key" Else StdOut.WriteLine "Do Not Have Query Value Access Rights on Key" End If oReg.CheckAccess HKEY_LOCAL_MACHINE, strKeyPath, KEY_SET_VALUE, bHasAccessRight If bHasAccessRight = True Then StdOut.WriteLine "Have Set Value Access Rights on Key" Else StdOut.WriteLine "Do Not Have Set Value Access Rights on Key" End If oReg.CheckAccess HKEY_LOCAL_MACHINE, strKeyPath, KEY_CREATE_SUB_KEY, bHasAccessRight If bHasAccessRight = True Then StdOut.WriteLine "Have Create SubKey Access Rights on Key" Else StdOut.WriteLine "Do Not Have Create SubKey Access Rights on Key" End If oReg.CheckAccess HKEY_LOCAL_MACHINE, strKeyPath, DELETE, bHasAccessRight If bHasAccessRight = True Then StdOut.WriteLine "Have Delete Access Rights on Key" Else StdOut.WriteLine "Do Not Have Delete Access Rights on Key" End If
感謝各位的閱讀!關(guān)于“怎么用vbs檢查注冊(cè)表項(xiàng)的訪問(wèn)權(quán)限”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!