您现在的位置是:网站首页> 编程资料编程资料

tweakomatic hta 下载_hta_

2023-05-25 451人已围观

简介 tweakomatic hta 下载_hta_

复制代码 代码如下:





Tweakomatic 1.0

     ID="objTweakomatic" 
     APPLICATIONNAME="Tweakomatic"
     SCROLL="no"
     SINGLEINSTANCE="yes"
     WINDOWSTATE="maximize"
>








    Const adOpenStatic = 3
    Const adLockOptimistic = 3
    Const adUseClient = 3
    DefaultComputer = "."
    MasterFile = ""
    RetrievalFile = ""
    StartHelp = "To begin, select a manageable component, and then select a category of tasks. When you do so, a set of tasks will be displayed in the Task Area. Click a task and two scripts will automatically be created: one for configuring information, the other for retrieving information."
    Help2 = "Select a category from the list of categories. When you do so, a set of tasks will be displayed in the Task Area. Click a task and two scripts will automatically be created: one for configuring information, the other for retrieving information."
    Help3 = "Click a task and two scripts will automatically be created: one for configuring information, the other for retrieving information."


Sub Window_Onload
    Set objConnection = CreateObject("ADODB.Connection") 
    objConnection.Open "Provider= Microsoft.Jet.OLEDB.4.0; Data Source=tweakomatic.mdb"
    Set objRecordset = CreateObject("ADODB.Recordset")
    objRecordset.CursorLocation = adUseClient
    objRecordset.Open "SELECT DISTINCT Tweaks.Component FROM Tweaks ORDER BY Tweaks.Component" , objConnection,  adOpenStatic, adLockOptimistic
    objRecordSet.MoveFirst
    strHTML = "
    strHTML = strHTML & ""
    Do Until objRecordSet.EOF
        strHTML = strHTML & "            objRecordSet.Fields.Item("Component") & chr(34) & _
                ">" & objRecordSet.Fields.Item("Component")
        objRecordSet.MoveNext
    Loop
    strHTML = strHTML & ""
    ComponentArea.InnerHTML = strHTML
    run_button.disabled = True
    run_button2.disabled = True
    save_button.disabled = True
    save_button2.disabled = True    
    change_button.disabled = True
    Master_button.disabled = True
    Master_button2.disabled = True
    show_button.disabled = True
    show_button2.disabled = True
    HelpArea.InnerHTML = StartHelp
End Sub



Sub Window_OnUnload
   On Error Resume Next
   Set objFSO = CreateObject("Scripting.FileSystemObject")
   objFSO.DeleteFile "temp_script.sm"
   Set objFSO = Nothing
   self.Close()
End Sub


Sub GetCategoryInfo()
    On Error Resume Next
    FilterValue = ComponentList.Value
    Set objConnection = CreateObject("ADODB.Connection") 
    objConnection.Open "Provider= Microsoft.Jet.OLEDB.4.0; Data Source=tweakomatic.mdb"
    Set objRecordset = CreateObject("ADODB.Recordset")
    objRecordset.CursorLocation = adUseClient
    objRecordset.Open "SELECT DISTINCT Tweaks.Category FROM Tweaks Where Component = '" & FilterValue & "'ORDER BY Tweaks.Category" , objConnection,  adOpenStatic, adLockOptimistic
    objRecordSet.MoveFirst
    CategoryArea.InnerHTML = ""
    strHTML = "
    strHTML = strHTML & ""
    Do Until objRecordSet.EOF
        strHTML = strHTML & "            objRecordSet.Fields.Item("Category") & chr(34) &_
                ">" & objRecordSet.Fields.Item("Category")
        objRecordSet.MoveNext
    Loop
    strHTML = strHTML & ""
    CategoryArea.InnerHTML = strHTML
    TaskArea.InnerHTML = ""
    HelpArea.InnerHTML= Help2
    ScriptArea.Value = ""
    RetrievalArea.Value = ""
    run_button.disabled = True
    run_button2.disabled = True
    save_button.disabled = True
    save_button2.disabled = True
    change_button.disabled = True
    Master_button.disabled = True
    Master_button2.disabled = True
    objRecordSet.Close
    objConnection.Close
End Sub


Sub GetTaskInfo()
    On Error Resume Next
    FilterValue = ComponentList.Value
    FilterValue2 = CategoryList.Value
    Set objConnection = CreateObject("ADODB.Connection") 
    objConnection.Open "Provider= Microsoft.Jet.OLEDB.4.0; Data Source=tweakomatic.mdb"
    Set objRecordset = CreateObject("ADODB.Recordset")
    objRecordset.CursorLocation = adUseClient
    objRecordset.Open "SELECT DISTINCT Tweaks.Task FROM Tweaks Where Component = '" & FilterValue & "' AND Category = '" & FilterValue2 & "'ORDER BY Tweaks.Task" , objConnection,  adOpenStatic, adLockOptimistic
    objRecordSet.MoveFirst
    TaskArea.InnerHTML = ""
    strHTML = "
    Do Until objRecordSet.EOF
        strHTML = strHTML & "            objRecordSet.Fields.Item("Task") & chr(34) &_
                ">" & objRecordSet.Fields.Item("Task")
        objRecordSet.MoveNext
    Loop
    strHTML = strHTML & ""
    TaskArea.InnerHTML = strHTML
    HelpArea.InnerHTML= Help3
    ScriptArea.Value = ""
    RetrievalArea.Value = ""
    run_button.disabled = True
    run_button2.disabled = True
    save_button.disabled = True
    save_button2.disabled = True
    change_button.disabled = True
    Master_button.disabled = True
    Master_button2.disabled = True
    objRecordSet.Close
    objConnection.Close
End Sub


Sub GetHelpText()
    FilterValue = TaskList.Value
    Set objConnection = CreateObject("ADODB.Connection") 
    objConnection.Open "Provider= Microsoft.Jet.OLEDB.4.0; Data Source=tweakomatic.mdb"
    Set objRecordset = CreateObject("ADODB.Recordset")
    objRecordset.CursorLocation = adUseClient
    objRecordset.Open "SELECT * FROM Tweaks WHERE Task = '" & FilterValue & "' ORDER BY Tweaks.Task" , objConnection,  adOpenStatic, adLockOptimistic
    objRecordSet.MoveFirst
    Do Until objRecordSet.EOF
        strHTML = objRecordSet.Fields.Item("Help") 
        strText2 = "On Error Resume Next" & vbCrLf
        strLocation  = objRecordSet.Fields.Item("RegistryLocation") 
        If StrLocation = "HKEY_CURRENT_USER" Then
            strText = "HKEY_CURRENT_USER = &H80000001" & VbCrLf 
            strText2 = strText2 & "HKEY_CURRENT_USER = &H80000001" & VbCrLf

            strText = strText & "strComputer = " & chr(34) & DefaultComputer & chr(34) & VbCrLf
            strText2 = strText2 & "strComputer = " & chr(34) & DefaultComputer & chr(34) & VbCrLf

            strText = strText & "Set objReg = GetObject(" & chr(34) & "winmgmts:\\" & chr(34)
            strText2 = strText2 & "Set objReg = GetObject(" & chr(34) & "winmgmts:\\" & chr(34)

            strText = strText & " & strComputer & " & chr(34) & "\root\default:StdRegProv" & chr(34) & ")" & VbCrLf
            strText2 = strText2 & " & strComputer & " & chr(34) & "\root\default:StdRegProv" & chr(34) & ")" & VbCrLf

            strText = strText & "strKeyPath = " & chr(34) & objRecordSet.Fields.Item("RegKey") & chr(34) & VbCrLf 
            strText2 = strtext2 & "strKeyPath = " & chr(34) & objRecordSet.Fields.Item("RegKey") & chr(34) & VbCrLf 

            strText = strText & "objReg.CreateKey " & strLocation & ", strKeyPath" & VbCrLf

            strText = strText & "ValueName = " & chr(34) & objRecordSet.Fields.Item("RegValue") & chr(34) & VbCrLf
            strText2 = strText2 & "ValueName = " & chr(34) & objRecordSet.Fields.Item("RegValue") & chr(34) & VbCrLf

        Else
            strText = strText & "HKEY_LOCAL_MACHINE = &H80000002" & vbCrLf
            strText2 = strText2 & "HKEY_LOCAL_MACHINE = &H80000002" & vbCrLf

            strText = strText & "strComputer = " & chr(34) & DefaultComputer & chr(34) & VbCrLf
            strText2 = strText2 & "strComputer = " & chr(34) & DefaultComputer & chr(34) & VbCrLf

            strText = strText & "Set objReg = GetObject(" & chr(34) & "winmgmts:\\" & chr(34)
            strText2 = strText2 & "Set objReg = GetObject(" & chr(34) & "winmgmts:\\" & chr(34)

            strText = strText & " & strComputer & " & chr(34) & "\root\default:StdRegProv" & chr(34) & ")" & VbCrLf
            strText2 = strText2 & " & strComputer & " & chr(34) & "\root\default:StdRegProv" & chr(34) & ")" & VbCrLf

            strText = strText & "strKeyPath = " & chr(34) & objRecordSet.Fields.Item("RegKey") & chr(34) & VbCrLf 
            strText2 = strText2 & "strKeyPath = " & chr(34) & objRecordSet.Fields.Item("R

-六神源码网