Set oRootDir = oDrive.RootFolder Else Set oRootDir = oFS.GetFolder(strRoot) End IF Else EchoB("<B>Folder ( " & strRoot & " ) Not Found.") Exit Sub End IF setRoot = oRootDir
Echo("<SELECT NAME=" & Chr(34) & "frmDllPath" & Chr(34) & ">") Call getAllDlls(oRootDir) EchoB("</SELECT>") 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("<OPTION value=" & Chr(34) & oFile.Path & Chr(34) & ">" _ & oFile.Name & "</Option>") 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("<OPTION value=" & Chr(34) & oFile.Path & Chr(34) & ">" _ & oFile.Name & "</Option>") 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
Sub BuildOptions EchoB("Register: <INPUT TYPE=RADIO NAME=frmMethod value=REG CHECKED>") EchoB("unRegister: <INPUT TYPE=RADIO NAME=frmMethod value=UNREG>") End Sub
Function Echo(str) Echo = Response.Write(str & vbCrLf) End Function
Function EchoB(str) EchoB = Response.Write(str & "<BR>" & vbCrLf) End Function
Sub Cleanup(obj) If isObject(obj) Then Set obj = Nothing End IF End Sub