神剑山庄资源网 Design By www.hcban.com
复制代码 代码如下:
<html>
<head>
<title>Tweakomatic 1.0</title>
<HTA:APPLICATION
ID="objTweakomatic"
APPLICATIONNAME="Tweakomatic"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"
>
</head>
<style>
BODY
{
background-color: buttonface;
font-family: Helvetica;
font-size: 8pt;
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
margin-bottom: 10px;
}
.button
{
font-family: Helvetica;
font-size: 8pt;
}
textarea
{
font-family: arial;
font-size: 8pt;
margin-left: 3px;
}
select
{
font-family: arial;
font-size: 8pt;
width: 450px;
margin-left: 0px;
}
td
{
font-family: arial;
font-size: 10pt;
}
</style>
<SCRIPT LANGUAGE="VBScript">
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 = "<select style='width: 460' onChange=""GetCategoryInfo()"" name=ComponentList>"
strHTML = strHTML & "<option value= " & chr(34) & chr(34) & ">"
Do Until objRecordSet.EOF
strHTML = strHTML & "<option value= " & chr(34) & _
objRecordSet.Fields.Item("Component") & chr(34) & _
">" & objRecordSet.Fields.Item("Component")
objRecordSet.MoveNext
Loop
strHTML = strHTML & "</select>"
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 = "<select style='width: 460' onChange=""GetTaskInfo"" name=CategoryList>"
strHTML = strHTML & "<option value= " & chr(34) & chr(34) & ">"
Do Until objRecordSet.EOF
strHTML = strHTML & "<option value= " & chr(34) &_
objRecordSet.Fields.Item("Category") & chr(34) &_
">" & objRecordSet.Fields.Item("Category")
objRecordSet.MoveNext
Loop
strHTML = strHTML & "</select>"
CategoryArea.InnerHTML = strHTML
TaskArea.InnerHTML = "<select size='15' name='D2'>"
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 = "<select size = '15' style='width: 460' onChange=""GetHelpText()"" name=TaskList>"
Do Until objRecordSet.EOF
strHTML = strHTML & "<option value= " & chr(34) &_
objRecordSet.Fields.Item("Task") & chr(34) &_
">" & objRecordSet.Fields.Item("Task")
objRecordSet.MoveNext
Loop
strHTML = strHTML & "</select>"
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("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
End If
strValueType = objRecordSet.Fields.Item("DataType")
If strValueType = "REG_DWORD" Then
strText = strText & "dwValue = " & objRecordSet.Fields.Item("DefaultValue") & VbCrLf
strText = strText & "objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue" & VbCrLf
strText2 = strText2 & "objReg.GetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue" & VbCrLf
strEcho = " Wscript.Echo " & chr(34) & FilterValue & ": " & chr(34) & ", dwValue" & vbCrLf
Else
strText = strText & "strValue = " & chr(34) & objRecordSet.Fields.Item("DefaultValue") & chr(34) & VbCrLf
strText = strText & "objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, ValueName, strValue" & VbCrLf
strText2 = strText2 & " objReg.GetStringValue HKEY_CURRENT_USER, strKeyPath, ValueName, strValue" & VbCrLf
strEcho = " Wscript.Echo " & chr(34) & FilterValue & ": " & chr(34) & ", strValue" & vbCrLf
End If
strText2 = strText2 & "If IsNull(strValue) Then" & VbCrLf
strText2 = strtext2 & " Wscript.Echo " & chr(34) & FilterValue & ": The value is either Null or could not be found in the registry." & chr(34) & VbCrLf
strText2 = strText2 & "Else" & vbCrLf
strText2 = strText2 & strEcho
strText2 = strtext2 & "End If"
objRecordSet.MoveNext
Loop
HelpArea.InnerHTML = strHTML
ScriptArea.Value = strText
RetrievalArea.Value = strText2
run_button.disabled = False
run_button2.disabled = False
save_button.disabled = False
save_button2.disabled = False
change_button.disabled = False
Master_button.disabled = False
Master_button2.disabled = False
End Sub
Sub RunConfigurationScript()
Set objFS = CreateObject("Scripting.FileSystemObject")
strTmpName = "temp_script.sm"
Set objScript = objFS.CreateTextFile(strTmpName)
objScript.Write ScriptArea.Value
objScript.Close
Set objShell = CreateObject("WScript.Shell")
strCmdLine = "wscript.exe //E:VBScript " & strTmpName
objShell.Run strCmdLine
strAction = "Configured value for " & TaskList.Value
ActionArea.InnerHTML = strAction
End Sub
Sub RunRetrievalScript()
Set objFS = CreateObject("Scripting.FileSystemObject")
strTmpName = "temp_script.sm"
Set objScript = objFS.CreateTextFile(strTmpName)
objScript.Write RetrievalArea.Value
objScript.Close
Set objShell = CreateObject("WScript.Shell")
strCmdLine = "wscript.exe //E:VBScript " & strTmpName
objShell.Run strCmdLine
strAction = "Retrieved value for " & TaskList.Value
ActionArea.InnerHTML = strAction
End Sub
Sub SaveConfigurationScript()
Set objFSO = CreateObject("Scripting.FileSystemObject")
strSaveFileName = InputBox("Please enter the complete path where you want to save your script (for example, C:\Scripts\MyScript.vbs).")
If strSaveFileName = "" Then
Exit Sub
End If
Set objFile = objFSO.CreateTextFile(strSaveFileName)
objFile.WriteLine ScriptArea.Value
objFile.Close
strAction = "Saved " & TaskList.Value & " to " & strSaveFileName
ActionArea.InnerHTML = strAction
End Sub
Sub SaveRetrievalScript()
Set objFSO = CreateObject("Scripting.FileSystemObject")
strSaveFileName = InputBox("Please enter the complete path where you want to save your script (for example, C:\Scripts\MyScript.vbs).")
If strSaveFileName = "" Then
Exit Sub
End If
Set objFile = objFSO.CreateTextFile(strSaveFileName)
objFile.WriteLine RetrievalArea.Value
objFile.Close
strAction = "Saved " & TaskList.Value & " to " & strSaveFileName
ActionArea.InnerHTML = strAction
End Sub
Sub ChangeValue()
strCurrent = ScriptArea.Value
NewValue = InputBox("Please enter the new value: ")
If NewValue = "" Then
Exit Sub
End If
ScriptType = Split(strCurrent, vbCrLf, -1)
If Left(ScriptType(6),2) = "dw" Then
If Not IsNumeric(NewValue) Then
Msgbox "You must enter a number when configuring DWORD registry values."
Exit Sub
End If
ScriptType(6) = "dwValue = " & NewValue
Else
ScriptType(6) = "strValue = " & chr(34) & NewValue & chr(34)
End If
strReplace = Join(ScriptType, vbcrlf)
ScriptArea.Value = strReplace
strAction = "Changed value for " & TaskList.Value & " to " & NewValue
ActionArea.InnerHTML = strAction
End Sub
Sub ChangeMasterFile()
If MasterFile = "" Then
strCurrentFile = "Currently you do not have an master script. "
Else
strCurrentFile = "Your current master script is " & MasterFile & ". "
End If
strMessage = strCurrentFile & "Please enter the path to the new master script: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(NewValue) Then
MasterFile = NewValue
show_button.disabled = False
Else
CreateFile = Msgbox("This file does not exist. Would you like to create it",4)
If CreateFile = vbYes Then
objFSO.CreateTextFile(NewValue)
MasterFile = NewValue
show_button.disabled = False
End If
End If
strAction = "Changed name of master script to " & NewValue
ActionArea.InnerHTML = strAction
End Sub
Sub ChangeRetrievalFile()
If RetrievalFile = "" Then
strCurrentFile = "Currently you do not have a retrieval master script. "
Else
strCurrentFile = "You current retrieval master script is " & RetrievalFile & ". "
End If
strMessage = strCurrentFile & "Please enter the path to the new retrieval master script: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(NewValue) Then
RetrievalFile = NewValue
show_button2.disabled = False
Else
CreateFile = Msgbox("This file does not exist. Would you like to create it",4)
If CreateFile = vbYes Then
objFSO.CreateTextFile(NewValue)
RetrievalFile = NewValue
show_button2.disabled = False
End If
End If
strAction = "Changed name of retrieval master script to " & NewValue
ActionArea.InnerHTML = strAction
End Sub
Sub SetComputerName()
strMessage = "Curently your scripts are using " & DefaultComputer & " as the default computer name. Please enter the new computer name. To run the script against the local computer, simply type a period (.) for the computer name: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
DefaultComputer = NewValue
strAction = "Changed default computer name to " & NewValue
ActionArea.InnerHTML = strAction
End Sub
Sub MasterConfigurationScript()
Set objFSO = CreateObject("Scripting.FileSystemObject")
If MasterFile = "" Then
strCurrentFile = "Currently you do not have a master script. "
strMessage = strCurrentFile & "Please enter the path to the new master script: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
If objFSO.FileExists(NewValue) Then
MasterFile = NewValue
show_button.disabled = False
Else
CreateFile = Msgbox("This file does not exist. Would you like to create it",4)
If CreateFile = vbYes Then
objFSO.CreateTextFile(NewValue)
MasterFile = NewValue
show_button.disabled = False
Else
Exit Sub
End If
End If
End If
Set objFile = objFSO.OpenTextFile(MasterFile, 8)
objFile.WriteLine Chr(39) & " " & TaskList.Value
objFile.WriteLine ScriptArea.Value
objFile.WriteLine vbCrLf & vbCrLf
objFile.Close
strAction = "Appended " & TaskList.Value & " to " & MasterFile
ActionArea.InnerHTML = strAction
End Sub
Sub MasterRetrievalScript()
Set objFSO = CreateObject("Scripting.FileSystemObject")
If RetrievalFile = "" Then
strCurrentFile = "Currently you do not have a retrieval master script. "
strMessage = strCurrentFile & "Please enter the path to the new master script: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
If objFSO.FileExists(NewValue) Then
RetrievalFile = NewValue
show_button2.disabled = False
Else
CreateFile = Msgbox("This file does not exist. Would you like to create it",4)
If CreateFile = vbYes Then
objFSO.CreateTextFile(NewValue)
RetrievalFile = NewValue
show_button2.disabled = False
Else
Exit Sub
End If
End If
End If
Set objFile = objFSO.OpenTextFile(RetrievalFile, 8)
objFile.WriteLine Chr(39) & " " & TaskList.Value
objFile.WriteLine RetrievalArea.Value
objFile.WriteLine vbCrLf & vbCrLf
objFile.Close
strAction = "Appended " & TaskList.Value & " to " & RetrievalFile
ActionArea.InnerHTML = strAction
End Sub
Sub ShowConfigurationScript()
Set objShell = CreateObject("WScript.Shell")
strCmdLine = "notepad.exe " & MasterFile
objShell.Run strCmdLine
strAction = "Opened file " & MasterFile & " in Notepad"
ActionArea.InnerHTML = strAction
End Sub
Sub ShowRetrievalScript()
Set objShell = CreateObject("WScript.Shell")
strCmdLine = "notepad.exe " & RetrievalFile
objShell.Run strCmdLine
strAction = "Opened file " & RetrievalFile & " in Notepad"
ActionArea.InnerHTML = strAction
End Sub
</SCRIPT>
<body>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber1">
<tr>
<td width = "50%"><b> Select a manageable component from this list</b>
</td>
<td width = "50%"><b> Select a task category from this list</b>
</td>
</tr>
<tr>
<td width="50%">
<span id="ComponentArea"></span>
</td>
<td width="50%"><span id="CategoryArea"><select size="1" name="D1"></select></span></td>
</tr>
</table>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber2">
<tr>
<td width = "50%"><b> Select an individual task from this list</b>
</td>
<td width = "50%"><b>Task description</b>
</td>
</tr>
<tr>
<td width="50%"><span id="TaskArea"><select size="15" name="D2"></span></td>
<td width="50%" valign="top"><font color="navy"><span id="HelpArea"></span></font></td>
</tr>
</table>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber3">
<tr>
<td width = "50%"><b> Script for carrying out this task</b>
</td>
<td width = "50%"><b> Script for retrieving the current task setting</b>
</td>
</tr>
<tr>
<td width="50%">
<textarea rows="12" name="ScriptArea" cols="90"></textarea></td>
<td width="50%">
<textarea rows="12" name="RetrievalArea" cols="90"></textarea></td>
</tr>
</table>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber2">
<tr>
<td width="50%"><input id=runbutton class="button" type="button" value="Run Script" name="run_button" onClick="RunConfigurationScript()"><input id=runbutton class="button" type="button" value="Save Script" name="save_button" onClick="SaveConfigurationScript()"><input id=runbutton class="button" type="button" value="Change Value" name="change_button" onClick="ChangeValue()"><input id=runbutton class="button" type="button" value="Master Script" name="Master_button" onClick="MasterConfigurationScript()"><input id=runbutton class="button" type="button" value="ShowScript" name="show_button" onClick="ShowConfigurationScript()"></td>
<td width="50%"><input id=runbutton class="button" type="button" value="Run Script" name="run_button2" onClick="RunRetrievalScript()"><input id=runbutton class="button" type="button" value="Save Script" name="save_button2" onClick="SaveRetrievalScript()"><input id=runbutton class="button" type="button" value="Master Script" name="Master_button2" onClick="MasterRetrievalScript()"><input id=runbutton class="button" type="button" value="ShowScript" name="show_button2" onClick="ShowRetrievalScript()"></td>
</tr>
</table>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber2">
<tr>
<td width="100%"> <br><b>Tweakomatic Options</b> <input id=runbutton class="button" type="button" value="Set Computer Name" name="computer_name" onClick="SetComputerName()"><input id=runbutton class="button" type="button" value="Set Configuration Master Script" name="set_Master_file" onClick="ChangeMasterFile()"><input id=runbutton class="button" type="button" value="Set Retrieval Master Script" name="set_retrieval_button" onClick="ChangeRetrievalFile()"></td>
</tr>
<tr>
<td width="100%"> <br><b>Last Action: </b><span id="ActionArea"></span></td>
</tr>
</table>
</body>
</html>
下载此文件
<html>
<head>
<title>Tweakomatic 1.0</title>
<HTA:APPLICATION
ID="objTweakomatic"
APPLICATIONNAME="Tweakomatic"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximize"
>
</head>
<style>
BODY
{
background-color: buttonface;
font-family: Helvetica;
font-size: 8pt;
margin-top: 10px;
margin-left: 10px;
margin-right: 10px;
margin-bottom: 10px;
}
.button
{
font-family: Helvetica;
font-size: 8pt;
}
textarea
{
font-family: arial;
font-size: 8pt;
margin-left: 3px;
}
select
{
font-family: arial;
font-size: 8pt;
width: 450px;
margin-left: 0px;
}
td
{
font-family: arial;
font-size: 10pt;
}
</style>
<SCRIPT LANGUAGE="VBScript">
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 = "<select style='width: 460' onChange=""GetCategoryInfo()"" name=ComponentList>"
strHTML = strHTML & "<option value= " & chr(34) & chr(34) & ">"
Do Until objRecordSet.EOF
strHTML = strHTML & "<option value= " & chr(34) & _
objRecordSet.Fields.Item("Component") & chr(34) & _
">" & objRecordSet.Fields.Item("Component")
objRecordSet.MoveNext
Loop
strHTML = strHTML & "</select>"
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 = "<select style='width: 460' onChange=""GetTaskInfo"" name=CategoryList>"
strHTML = strHTML & "<option value= " & chr(34) & chr(34) & ">"
Do Until objRecordSet.EOF
strHTML = strHTML & "<option value= " & chr(34) &_
objRecordSet.Fields.Item("Category") & chr(34) &_
">" & objRecordSet.Fields.Item("Category")
objRecordSet.MoveNext
Loop
strHTML = strHTML & "</select>"
CategoryArea.InnerHTML = strHTML
TaskArea.InnerHTML = "<select size='15' name='D2'>"
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 = "<select size = '15' style='width: 460' onChange=""GetHelpText()"" name=TaskList>"
Do Until objRecordSet.EOF
strHTML = strHTML & "<option value= " & chr(34) &_
objRecordSet.Fields.Item("Task") & chr(34) &_
">" & objRecordSet.Fields.Item("Task")
objRecordSet.MoveNext
Loop
strHTML = strHTML & "</select>"
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("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
End If
strValueType = objRecordSet.Fields.Item("DataType")
If strValueType = "REG_DWORD" Then
strText = strText & "dwValue = " & objRecordSet.Fields.Item("DefaultValue") & VbCrLf
strText = strText & "objReg.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue" & VbCrLf
strText2 = strText2 & "objReg.GetDWORDValue HKEY_CURRENT_USER, strKeyPath, ValueName, dwValue" & VbCrLf
strEcho = " Wscript.Echo " & chr(34) & FilterValue & ": " & chr(34) & ", dwValue" & vbCrLf
Else
strText = strText & "strValue = " & chr(34) & objRecordSet.Fields.Item("DefaultValue") & chr(34) & VbCrLf
strText = strText & "objReg.SetStringValue HKEY_CURRENT_USER, strKeyPath, ValueName, strValue" & VbCrLf
strText2 = strText2 & " objReg.GetStringValue HKEY_CURRENT_USER, strKeyPath, ValueName, strValue" & VbCrLf
strEcho = " Wscript.Echo " & chr(34) & FilterValue & ": " & chr(34) & ", strValue" & vbCrLf
End If
strText2 = strText2 & "If IsNull(strValue) Then" & VbCrLf
strText2 = strtext2 & " Wscript.Echo " & chr(34) & FilterValue & ": The value is either Null or could not be found in the registry." & chr(34) & VbCrLf
strText2 = strText2 & "Else" & vbCrLf
strText2 = strText2 & strEcho
strText2 = strtext2 & "End If"
objRecordSet.MoveNext
Loop
HelpArea.InnerHTML = strHTML
ScriptArea.Value = strText
RetrievalArea.Value = strText2
run_button.disabled = False
run_button2.disabled = False
save_button.disabled = False
save_button2.disabled = False
change_button.disabled = False
Master_button.disabled = False
Master_button2.disabled = False
End Sub
Sub RunConfigurationScript()
Set objFS = CreateObject("Scripting.FileSystemObject")
strTmpName = "temp_script.sm"
Set objScript = objFS.CreateTextFile(strTmpName)
objScript.Write ScriptArea.Value
objScript.Close
Set objShell = CreateObject("WScript.Shell")
strCmdLine = "wscript.exe //E:VBScript " & strTmpName
objShell.Run strCmdLine
strAction = "Configured value for " & TaskList.Value
ActionArea.InnerHTML = strAction
End Sub
Sub RunRetrievalScript()
Set objFS = CreateObject("Scripting.FileSystemObject")
strTmpName = "temp_script.sm"
Set objScript = objFS.CreateTextFile(strTmpName)
objScript.Write RetrievalArea.Value
objScript.Close
Set objShell = CreateObject("WScript.Shell")
strCmdLine = "wscript.exe //E:VBScript " & strTmpName
objShell.Run strCmdLine
strAction = "Retrieved value for " & TaskList.Value
ActionArea.InnerHTML = strAction
End Sub
Sub SaveConfigurationScript()
Set objFSO = CreateObject("Scripting.FileSystemObject")
strSaveFileName = InputBox("Please enter the complete path where you want to save your script (for example, C:\Scripts\MyScript.vbs).")
If strSaveFileName = "" Then
Exit Sub
End If
Set objFile = objFSO.CreateTextFile(strSaveFileName)
objFile.WriteLine ScriptArea.Value
objFile.Close
strAction = "Saved " & TaskList.Value & " to " & strSaveFileName
ActionArea.InnerHTML = strAction
End Sub
Sub SaveRetrievalScript()
Set objFSO = CreateObject("Scripting.FileSystemObject")
strSaveFileName = InputBox("Please enter the complete path where you want to save your script (for example, C:\Scripts\MyScript.vbs).")
If strSaveFileName = "" Then
Exit Sub
End If
Set objFile = objFSO.CreateTextFile(strSaveFileName)
objFile.WriteLine RetrievalArea.Value
objFile.Close
strAction = "Saved " & TaskList.Value & " to " & strSaveFileName
ActionArea.InnerHTML = strAction
End Sub
Sub ChangeValue()
strCurrent = ScriptArea.Value
NewValue = InputBox("Please enter the new value: ")
If NewValue = "" Then
Exit Sub
End If
ScriptType = Split(strCurrent, vbCrLf, -1)
If Left(ScriptType(6),2) = "dw" Then
If Not IsNumeric(NewValue) Then
Msgbox "You must enter a number when configuring DWORD registry values."
Exit Sub
End If
ScriptType(6) = "dwValue = " & NewValue
Else
ScriptType(6) = "strValue = " & chr(34) & NewValue & chr(34)
End If
strReplace = Join(ScriptType, vbcrlf)
ScriptArea.Value = strReplace
strAction = "Changed value for " & TaskList.Value & " to " & NewValue
ActionArea.InnerHTML = strAction
End Sub
Sub ChangeMasterFile()
If MasterFile = "" Then
strCurrentFile = "Currently you do not have an master script. "
Else
strCurrentFile = "Your current master script is " & MasterFile & ". "
End If
strMessage = strCurrentFile & "Please enter the path to the new master script: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(NewValue) Then
MasterFile = NewValue
show_button.disabled = False
Else
CreateFile = Msgbox("This file does not exist. Would you like to create it",4)
If CreateFile = vbYes Then
objFSO.CreateTextFile(NewValue)
MasterFile = NewValue
show_button.disabled = False
End If
End If
strAction = "Changed name of master script to " & NewValue
ActionArea.InnerHTML = strAction
End Sub
Sub ChangeRetrievalFile()
If RetrievalFile = "" Then
strCurrentFile = "Currently you do not have a retrieval master script. "
Else
strCurrentFile = "You current retrieval master script is " & RetrievalFile & ". "
End If
strMessage = strCurrentFile & "Please enter the path to the new retrieval master script: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(NewValue) Then
RetrievalFile = NewValue
show_button2.disabled = False
Else
CreateFile = Msgbox("This file does not exist. Would you like to create it",4)
If CreateFile = vbYes Then
objFSO.CreateTextFile(NewValue)
RetrievalFile = NewValue
show_button2.disabled = False
End If
End If
strAction = "Changed name of retrieval master script to " & NewValue
ActionArea.InnerHTML = strAction
End Sub
Sub SetComputerName()
strMessage = "Curently your scripts are using " & DefaultComputer & " as the default computer name. Please enter the new computer name. To run the script against the local computer, simply type a period (.) for the computer name: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
DefaultComputer = NewValue
strAction = "Changed default computer name to " & NewValue
ActionArea.InnerHTML = strAction
End Sub
Sub MasterConfigurationScript()
Set objFSO = CreateObject("Scripting.FileSystemObject")
If MasterFile = "" Then
strCurrentFile = "Currently you do not have a master script. "
strMessage = strCurrentFile & "Please enter the path to the new master script: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
If objFSO.FileExists(NewValue) Then
MasterFile = NewValue
show_button.disabled = False
Else
CreateFile = Msgbox("This file does not exist. Would you like to create it",4)
If CreateFile = vbYes Then
objFSO.CreateTextFile(NewValue)
MasterFile = NewValue
show_button.disabled = False
Else
Exit Sub
End If
End If
End If
Set objFile = objFSO.OpenTextFile(MasterFile, 8)
objFile.WriteLine Chr(39) & " " & TaskList.Value
objFile.WriteLine ScriptArea.Value
objFile.WriteLine vbCrLf & vbCrLf
objFile.Close
strAction = "Appended " & TaskList.Value & " to " & MasterFile
ActionArea.InnerHTML = strAction
End Sub
Sub MasterRetrievalScript()
Set objFSO = CreateObject("Scripting.FileSystemObject")
If RetrievalFile = "" Then
strCurrentFile = "Currently you do not have a retrieval master script. "
strMessage = strCurrentFile & "Please enter the path to the new master script: "
NewValue = InputBox(strMessage)
If NewValue = "" Then
Exit Sub
End If
If objFSO.FileExists(NewValue) Then
RetrievalFile = NewValue
show_button2.disabled = False
Else
CreateFile = Msgbox("This file does not exist. Would you like to create it",4)
If CreateFile = vbYes Then
objFSO.CreateTextFile(NewValue)
RetrievalFile = NewValue
show_button2.disabled = False
Else
Exit Sub
End If
End If
End If
Set objFile = objFSO.OpenTextFile(RetrievalFile, 8)
objFile.WriteLine Chr(39) & " " & TaskList.Value
objFile.WriteLine RetrievalArea.Value
objFile.WriteLine vbCrLf & vbCrLf
objFile.Close
strAction = "Appended " & TaskList.Value & " to " & RetrievalFile
ActionArea.InnerHTML = strAction
End Sub
Sub ShowConfigurationScript()
Set objShell = CreateObject("WScript.Shell")
strCmdLine = "notepad.exe " & MasterFile
objShell.Run strCmdLine
strAction = "Opened file " & MasterFile & " in Notepad"
ActionArea.InnerHTML = strAction
End Sub
Sub ShowRetrievalScript()
Set objShell = CreateObject("WScript.Shell")
strCmdLine = "notepad.exe " & RetrievalFile
objShell.Run strCmdLine
strAction = "Opened file " & RetrievalFile & " in Notepad"
ActionArea.InnerHTML = strAction
End Sub
</SCRIPT>
<body>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber1">
<tr>
<td width = "50%"><b> Select a manageable component from this list</b>
</td>
<td width = "50%"><b> Select a task category from this list</b>
</td>
</tr>
<tr>
<td width="50%">
<span id="ComponentArea"></span>
</td>
<td width="50%"><span id="CategoryArea"><select size="1" name="D1"></select></span></td>
</tr>
</table>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber2">
<tr>
<td width = "50%"><b> Select an individual task from this list</b>
</td>
<td width = "50%"><b>Task description</b>
</td>
</tr>
<tr>
<td width="50%"><span id="TaskArea"><select size="15" name="D2"></span></td>
<td width="50%" valign="top"><font color="navy"><span id="HelpArea"></span></font></td>
</tr>
</table>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber3">
<tr>
<td width = "50%"><b> Script for carrying out this task</b>
</td>
<td width = "50%"><b> Script for retrieving the current task setting</b>
</td>
</tr>
<tr>
<td width="50%">
<textarea rows="12" name="ScriptArea" cols="90"></textarea></td>
<td width="50%">
<textarea rows="12" name="RetrievalArea" cols="90"></textarea></td>
</tr>
</table>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber2">
<tr>
<td width="50%"><input id=runbutton class="button" type="button" value="Run Script" name="run_button" onClick="RunConfigurationScript()"><input id=runbutton class="button" type="button" value="Save Script" name="save_button" onClick="SaveConfigurationScript()"><input id=runbutton class="button" type="button" value="Change Value" name="change_button" onClick="ChangeValue()"><input id=runbutton class="button" type="button" value="Master Script" name="Master_button" onClick="MasterConfigurationScript()"><input id=runbutton class="button" type="button" value="ShowScript" name="show_button" onClick="ShowConfigurationScript()"></td>
<td width="50%"><input id=runbutton class="button" type="button" value="Run Script" name="run_button2" onClick="RunRetrievalScript()"><input id=runbutton class="button" type="button" value="Save Script" name="save_button2" onClick="SaveRetrievalScript()"><input id=runbutton class="button" type="button" value="Master Script" name="Master_button2" onClick="MasterRetrievalScript()"><input id=runbutton class="button" type="button" value="ShowScript" name="show_button2" onClick="ShowRetrievalScript()"></td>
</tr>
</table>
<BR>
<table border="0" cellspacing="1" width="100%" id="AutoNumber2">
<tr>
<td width="100%"> <br><b>Tweakomatic Options</b> <input id=runbutton class="button" type="button" value="Set Computer Name" name="computer_name" onClick="SetComputerName()"><input id=runbutton class="button" type="button" value="Set Configuration Master Script" name="set_Master_file" onClick="ChangeMasterFile()"><input id=runbutton class="button" type="button" value="Set Retrieval Master Script" name="set_retrieval_button" onClick="ChangeRetrievalFile()"></td>
</tr>
<tr>
<td width="100%"> <br><b>Last Action: </b><span id="ActionArea"></span></td>
</tr>
</table>
</body>
</html>
下载此文件
神剑山庄资源网 Design By www.hcban.com
神剑山庄资源网
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
神剑山庄资源网 Design By www.hcban.com
暂无tweakomatic hta 下载的评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
2024年11月17日
2024年11月17日
- 中国武警男声合唱团《辉煌之声1天路》[DTS-WAV分轨]
- 紫薇《旧曲新韵》[320K/MP3][175.29MB]
- 紫薇《旧曲新韵》[FLAC/分轨][550.18MB]
- 周深《反深代词》[先听版][320K/MP3][72.71MB]
- 李佳薇.2024-会发光的【黑籁音乐】【FLAC分轨】
- 后弦.2012-很有爱【天浩盛世】【WAV+CUE】
- 林俊吉.2012-将你惜命命【美华】【WAV+CUE】
- 晓雅《分享》DTS-WAV
- 黑鸭子2008-飞歌[首版][WAV+CUE]
- 黄乙玲1989-水泼落地难收回[日本天龙版][WAV+CUE]
- 周深《反深代词》[先听版][FLAC/分轨][310.97MB]
- 姜育恒1984《什么时候·串起又散落》台湾复刻版[WAV+CUE][1G]
- 那英《如今》引进版[WAV+CUE][1G]
- 蔡幸娟.1991-真的让我爱你吗【飞碟】【WAV+CUE】
- 群星.2024-好团圆电视剧原声带【TME】【FLAC分轨】