Morel Posted March 2, 2006 Share Posted March 2, 2006 Hello i am try To Move All Our Shares in One Server to other location the only way is to change the Registry so i wrote a code the read the Keys and Delete Them and then i will create them with my changes * we have about 1000 Shares and i need to delete about 500 Keys What is Wrong With That Script it tell me that i have Exsited the Array Limit ??? #include<Array.Au3> Dim $Array[1] For $I = 1 to 1000 $ReadKey = RegEnumVal("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares",$I) $ReadVal = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares",$ReadKey) If StringInStr($ReadVal,"E:\Users",0) > 0 Then _ArrayAdd($Array,$ReadKey) EndIf Next $Array[0] = UBound($Array) For $X = 1 To $Array[0] RegDelete("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\Shares",$Array[$X]) Next Please Help Me ? Link to comment Share on other sites More sharing options...
randallc Posted March 2, 2006 Share Posted March 2, 2006 Hi, Try For $X = 1 To $Array[0]-1 Best, Randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now