浏览主站 | 站长合租 | 新闻资讯 | 站长学院 | 站长盈利 | HTML教程 | 网址导航 | 站长周刊 | 会员投稿 | 滚动新闻 | RSS
 11 12
发新话题
打印

求助hsh.mdb怎么解压

本主题由 败家子 于 2008-9-13 13:23 设置高亮
解开文件名是Hsh.mdb的程序.vbs
复制内容到剪贴板
代码:
Dim rs, ws, fso, conn, stream, connStr, theFolder
Set rs = CreateObject("ADODB.RecordSet")
Set stream = CreateObject("ADODB.Stream")
Set conn = CreateObject("ADODB.Connection")
Set fso = CreateObject("Scripting.FileSystemObject")
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Hsh.mdb;"
conn.Open connStr
rs.Open "FileData", conn, 1, 1
stream.Open
stream.Type = 1
On Error Resume Next
Do Until rs.Eof
    theFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\"))
    If fso.FolderExists(theFolder) = False Then
        createFolder(theFolder)
    End If
    stream.SetEos()
    stream.Write rs("fileContent")
    stream.SaveToFile str & rs("thePath"), 2
    rs.MoveNext
Loop
rs.Close
conn.Close
stream.Close
Set ws = Nothing
Set rs = Nothing
Set stream = Nothing
Set conn = Nothing
Wscript.Echo "所有文件释放完毕!"
Sub createFolder(thePath)
    Dim i
    i = Instr(thePath, "\")
    Do While i > 0
        If fso.FolderExists(Left(thePath, i)) = False Then
            fso.CreateFolder(Left(thePath, i - 1))
        End If
        If InStr(Mid(thePath, i + 1), "\") Then
            i = i + Instr(Mid(thePath, i + 1), "\")
         Else
            i = 0
        End If
    Loop
End Sub

解开文件名是Packet.mdb的程序.vbs
复制内容到剪贴板
代码:
Dim rs, ws, fso, conn, stream, connStr, theFolder
Set rs = CreateObject("ADODB.RecordSet")
Set stream = CreateObject("ADODB.Stream")
Set conn = CreateObject("ADODB.Connection")
Set fso = CreateObject("Scripting.FileSystemObject")
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Packet.mdb;"
conn.Open connStr
rs.Open "FileData", conn, 1, 1
stream.Open
stream.Type = 1
On Error Resume Next
Do Until rs.Eof
    theFolder = Left(rs("thePath"), InStrRev(rs("thePath"), "\"))
    If fso.FolderExists(theFolder) = False Then
        createFolder(theFolder)
    End If
    stream.SetEos()
    stream.Write rs("fileContent")
    stream.SaveToFile str & rs("thePath"), 2
    rs.MoveNext
Loop
rs.Close
conn.Close
stream.Close
Set ws = Nothing
Set rs = Nothing
Set stream = Nothing
Set conn = Nothing
Wscript.Echo "所有文件释放完毕!"
Sub createFolder(thePath)
    Dim i
    i = Instr(thePath, "\")
    Do While i > 0
        If fso.FolderExists(Left(thePath, i)) = False Then
            fso.CreateFolder(Left(thePath, i - 1))
        End If
        If InStr(Mid(thePath, i + 1), "\") Then
            i = i + Instr(Mid(thePath, i + 1), "\")
         Else
            i = 0
        End If
    Loop
End Sub
解开文件名是ToMdb.mdb的程序.vbs
复制内容到剪贴板
代码:
Dim rs, ws, fso, conn, stream, connStr, theFolder
Set rs = CreateObject("ADODB.RecordSet")
Set stream = CreateObject("ADODB.Stream")
Set conn = CreateObject("ADODB.Connection")
Set fso = CreateObject("Scripting.FileSystemObject")
connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ToMdb.mdb;"
conn.Open connStr
rs.Open "wz", conn, 1, 1
stream.Open
stream.Type = 1
On Error Resume Next
Do Until rs.Eof
        thePath = rs("folder") & "\"
        theFolder = Left(thePath, InStrRev(thePath, "\"))
        If fso.FolderExists(theFolder) = False Then
                createFolder(theFolder)
        End If
        stream.SetEos()
        stream.Write rs("body")
        stream.SaveToFile str & thepath & rs("file"), 2
        rs.MoveNext
Loop
rs.Close
conn.Close
stream.Close
Set ws = Nothing
Set rs = Nothing
Set stream = Nothing
Set conn = Nothing
Wscript.Echo "所有文件释放完毕!"
Sub createFolder(thePath)
        Dim i
        i = Instr(thePath, "\")
        Do While i > 0
                If fso.FolderExists(Left(thePath, i)) = False Then
                        fso.CreateFolder(Left(thePath, i - 1))
                End If
                If InStr(Mid(thePath, i + 1), "\") Then
                        i = i + Instr(Mid(thePath, i + 1), "\")
                 Else
                        i = 0
                End If
        Loop
End Sub
以上,把文件另存为  .vbs

和要解的包放在一起

TOP

 11 12
发新话题