public property let ofs(objofs) m_ofs = objofs end property
public property get ofs() set ofs = server.createobject("scripting.filesystemobject") end property
sub init(strroot) 'root to search (c:, d:, e:) dim odrive, orootdir if ofs.folderexists(strroot) then if len(strroot) < 3 then 'must be a drive set odrive = ofs.getdrive(strroot) set orootdir = odrive.rootfolder else set orootdir = ofs.getfolder(strroot) end if else echob("folder ( " & strroot & " ) not found.") exit sub end if setroot = orootdir
echo("") buildoptions end sub
sub getalldlls(oparentfolder) dim osubfolders, ofile, ofiles set osubfolders = oparentfolder.subfolders set opfiles = oparentfolder.files
for each ofile in opfiles if right(lcase(ofile.name), 4) = ".dll" or right(lcase(ofile.name), 4) = ".ocx" then echo("") end if next
on error resume next for each ofolder in osubfolders 'iterate all folders in drive set ofiles = ofolder.files for each ofile in ofiles if right(lcase(ofile.name), 4) = ".dll" or right(lcase(ofile.name), 4) = ".ocx" then echo("") end if next call getalldlls(ofolder) next on error goto 0 end sub
sub register(strfilepath, regmethod) dim thefile, strfile, oshell, exitcode set thefile = ofs.getfile(strfilepath) strfile = thefile.path