;EMC_Directiory_cleanup Addextender("WWWNT34I.DLL") IntControl(29, @TAB, 0, 0, 0) a=1 For emcsh= 1 to 10 loc=strcat("emc",a) gosub %loc% loc0=strcat(emc,"\*") a=a+1 list=DirItemize(loc0) count=ItemCount( list,@TAB ) num=1 boxopen("EMC Permissions","Change start") while list != "" shares=ItemExtract(num,List,@TAB) num= num+1 errormode(@off) us=wntUserExist("\\MSDC00",shares) If us==@true boxtext("Changing permissions for: %shares%") runwait("CACLS","%emc%\%shares%\transfer /t /e /c /g everyone:c") runwait("CACLS","%emc%\%shares%\personal /t /e /c /r everyone") runwait("CACLS","%emc%\%shares%\personal /t /e /c /g affymetrix_com\%shares%:c") runwait("CACLS","%emc%\%shares%\public /t /e /c /g affymetrix_com\%shares%:c") runwait("CACLS","%emc%\%shares% /t /e /g %shares%:c") handle=FileOpen("c:\EMCuserShare.txt","APPEND") Filewrite(handle,"User Share: %shares% HomeDir: %emc%") FileClose(handle) endif If num > count then break endwhile next errormode(@on) :emc1 emc="\\centralfs01\home1" return :emc2 emc="\\centralfs01\home2" return :emc3 emc="\\centralfs02\home3" return :emc4 emc="\\centralfs02\home4" return