ScriptomaticV2.hta学习脚本好工具_hta

复制代码 代码如下:

<html>

<!--
'********************************************************************
'*
'*  File:          Scriptomatic.hta
'*  Author:        The Scripting Guys, Microsoft Corporation
'*  Created:       August 2002
'*  Modified:      July 2003 (1.0 -> 1.1 -> 2.0)
'*                 March 2004
'*  Version:       2.0
'*
'*  Description:   Scriptomatic is a WMI Scripting learning tool
'*                 that creates example WMI scripts -- in VBScript,
'*                 JScript, or Perl -- that retrieve instances of
'*                 WMI managed resources that are described by
'*                 dynamic classes in the WMI schema (also known as
'*                 the Common Information Model or CIM).
'*
'* Dependencies:   There are two (that we're aware of anyway):
'*                 1. You must run Scriptomatic on a WMI-enabled
'*                    computer. Any Windows operating system that has
'*                    the number 2000 or higher in its name, or XP,
'*                    is a safe bet.
'*                 2. And to successfully run the scripts generated
'*                    with Scriptomatic, well, you must be
'*                    administrator. After all, these are system
'*                    administration scripts. This piece of advice is
'*                    especially important if you take advantage of
'*                    the multiple computer feature that's new to
'*                    this version of the tool.
'*
'* Copyright (C) 2003 Microsoft Corporation
'*
'********************************************************************
-->

<title>Scriptomatic Version 2.0 by The Microsoft Scripting Guys</title>

<HTA:APPLICATION 
     ID="objScriptomatic" 
     APPLICATIONNAME="Scriptomatic"
     SCROLL="no"
     SINGLEINSTANCE="yes"
     WINDOWSTATE="normal"
>
<head>

<style>
BODY
{
   background-color: buttonface;
   font-family: Helvetica;
   font-size: 8pt;
   margin-top: 2px;
   margin-left: 8px;
   margin-right: 3px;
   margin-bottom: 3px;
}

.button
{
   font-family: Helvetica;
   font-size: 8pt;
   width: 40px;
}

.wmibutton
{
   font-family: Helvetica;
   font-size: 8pt;
   width: 70px;
}
.bigger_button
{
   font-family: Helvetica;
   font-size: 8pt;
   width: 80px;
}

textarea
{
   font-family: Arial;
   font-size: 8pt;
   margin-left: 3px;
   margin-right: 3px;
}

select
{
   font-family: Arial;
   font-size: 8pt;
   width: 450px;
   margin-left: 0px;
}
</style>

'********************************************************************
'* BEGIN_SCRIPT
'********************************************************************
<script language="vbscript">                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   </script>
'****************************************************************************
'* END_SCRIPT
'****************************************************************************

</head>

'****************************************************************************
'* Our HTML layout - the only thing of note here is that when each of the
'* buttons is pressed (clicked), their onClick attributes causes the
'* appropriate subroutine to be called
'****************************************************************************

<body>

<table WIDTH="700" BORDER=1>

   <!--------------->
   <!-- first row -->
   <!--------------->
   <tr>
      <td VALIGN=TOP WIDTH=700 COLSPAN=2>
         <table BORDER=0>
         <tr>
            <td WIDTH=300 VALIGN=TOP><div style="font-size:8pt;">WMI Namespace</div><span id="wmi_namespaces"></span></td>
            <td WIDTH=400 VALIGN=TOP><div style="font-size:8pt;">WMI Class    </div><span id="wmi_classes"></span></td>
         </tr>
         </table>
      </td>
   </tr>
   <!---------------->
   <!-- second row -->
   <!---------------->
   <tr>
      <td VALIGN=TOP WIDTH=700 COLSPAN=2>
         <table BORDER=0>
            <tr>
               <td><input id=runbutton  class="button" type="button" value="Run"  name="run_button"  onClick="RunScript()"></td>
               <td><input id=cimv2button  class="button" type="button" value="CIMv2"  name="cimv2_button"  onClick="SetNamespaceToCIMV2()"></td>
               <td><input id=wmisourcebutton class="wmibutton" type="button" value="WMI Source" name="wmisource_button" onClick="SetWMIRepository()" title="Change computer used for WMI namespace and class information"></td>
               <td><input id=openbutton class="button" type="button" value="Open" name="open_button" onClick="OpenScript()"></td>
               <td><input id=savebutton class="button" type="button" value="Save" name="save_button" onClick="SaveScript()"></td>         
               <td><input id=quitbutton class="button" type="button" value="Quit" name="quit_button" onClick="QuitScript()"></td>
            </tr>
         </table>
      </td>
   </tr>
   <!--------------->
   <!-- third row -->
   <!--------------->
   <tr>
      <td WIDTH=600>
         <div ID=code_header></div>
         <div id="code" name="code"></div>
      </td>
      <td WIDTH=100 VALIGN=TOP>
         <table>
         <tr><th COLSPAN=2 style="font-size:8pt;"><hr> Language <hr></th></tr>
         <tr><td><span style="font-size:8pt;">VBScript</span></td><td><input type="radio" name="language" onClick="ComposeVBScriptCode" CHECKED></td><tr>
         <tr><td><span style="font-size:8pt;">Perl    </span></td><td><input type="radio" name="language" onClick="ComposePerlCode"></td></tr>
         <tr><td><span style="font-size:8pt;">JScript </span></td><td><input type="radio" name="language" onClick="ComposeJScriptCode"></td></tr>
         <tr><td><span style="font-size:8pt;">Python  </span></td><td><input type="radio" name="language" onClick="ComposePythonCode"></td></tr>

         <tr><th COLSPAN=2 style="font-size:8pt;"><hr> Output Format <hr></th></tr>
         <tr><td><span style="font-size:8pt;">Command Prompt</span></td><td><input type="radio" name="output" onClick="SetOutputFormat('CmdLine')" CHECKED></td><tr>
         <tr><td><span style="font-size:8pt;">Plain Text    </span></td><td><input type="radio" name="output" onClick="SetOutputFormat('PlainText')"></td></tr>
         <tr><td><span style="font-size:8pt;">HTML          </span></td><td><input type="radio" name="output" onClick="SetOutputFormat('HTML')"></td></tr>
         <tr><td><span style="font-size:8pt;">Excel         </span></td><td><input type="radio" name="output" onClick="SetOutputFormat('Excel')"></td></tr>
         <tr><td><span style="font-size:8pt;">XML           </span></td><td><input type="radio" name="output" onClick="SetOutputFormat('XML')"></td></tr>
         </table>
      </td>
   </tr>
   <!---------------->
   <!-- fourth row -->
   <!---------------->
   <tr>
      <td>
         <div>
         <div style="font-size:8pt;" TITLE="You can enter multiple computer names or IP addresses here. Separate them with commas...">Target Computers (comma-delimited):</div>
         <textarea ID=target_computers COLS=120 ROWS=5></textarea>
         </div>
      </td>
      <td align="center">
         <input class="bigger_button" TYPE=BUTTON VALUE="Update Script" TITLE="Modifies the Script to run against all Target Computers" onClick="ComposeCode()">
         <input class="bigger_button" TYPE=BUTTON VALUE="Load From File" onClick="LoadComputerNamesFromFile()">
      </td>
   </tr>
</table>
</body>
</html>

使用说明:里面包含ScriptomaticV2.hta与hta_helpomatic.hta两个文件。
Scriptomatic打包下载

时间: 2024-09-30 19:35:13

ScriptomaticV2.hta学习脚本好工具_hta的相关文章

脚本绘图工具总结(转)

我们总是要写各种文档,演示各种PPT,写各种博客,其中都少不了需要作出一些图形,用于形象的展示出想要表达的信息.Windows自带的画图.Paint.Net,Visio.Rose等各种工具,只要有足够的耐心,并且对这些工具足够熟悉,都可以做出各种强大.各种类型的图形. 但是我作为程序员,非常不擅长这种用鼠标操作的作图工具,迫切需要一款用键盘敲出来的脚本绘图工具,就像写文档时,不喜欢用Word而是用Markdown一样. 经过了解,总算是找到了一些这样的工具,下面分别介绍一下. graphviz

求救!求救ssh2 远程Shell脚本执行工具的问题

问题描述 最近在用ssh2远程Shell脚本执行工具写了一个代码测试执行普通的命令都可以比如"ls"啦什么的都可以但是执行动态的就不可以比如"top"也没有错误只是返回的是"".求大家帮忙呀!下面是代码main是测试用的是root的权限packagecom.syxp.sjyw.util;importjava.io.IOException;importjava.io.InputStream;importjava.nio.charset.Charse

【C#】数据库脚本生成工具(二)

年C#研发的数据库文档生成工具,给之后的工作带来了便利.近日,又针对该工具,用WinForm开发了数据库脚本生成工具-DbExcelToSQL. 下面数据库文档生成工具效果图: 感兴趣的朋友可以看下[C#附源码]数据库文档生成工具支持(Excel+Html)这篇博客的介绍. 目前这套工具主要分为两个部分: 1.数据库文档生成工具 [功能]根据数据库表结构,生成Excel.HTML文档. [开发语言]C# [输出项目]控制台 2.数据库脚本生成工具 [功       能]根据Excel表格中的数据

用hta与ajax实现的五笔字型编码查询工具_hta

存为hta文件,即可 复制代码 代码如下: <html>  <head>  <title>五笔字型编码查询工具</title>  <meta http-equiv="content-type" content="text/html;charset=gb2312" />  <HTA:Application      MaximizeButton="No"      Icon=&quo

hta实现的定时重启或关闭计算机的小工具_hta

<!-- /*------------------------------------------------------------------------------- Description:一个用于定时重启或关闭计算机的小工具,适用于Windows 2K/XP/2003 Author:十一狼 Email:112183883@163.com QQ:112183883 WebSite:http://www.w3cg.net/ ---------------------------------

hta应用—代码统计工具

统计 作者的blog: blog.never-online.net "Never Modules"-NCC(never code counter) tools-代码统计工具V1.01统计js,asp,aspx,cs,html,xml等 把源代码存为(hta)文件,因为hta文件没有状态栏,所以我这里建议大家存为html文件,这样可以在状态栏下看到NCC扫描的进度,我这里把NCC的maxloop设置为3000,所以文件统计到3000的时候,会自动终止,以防文件夹中文件太多造成运行的负担.

Lucene5学习之LuceneUtils工具类简单封装

     周六花了整整一下午,将Lucene5中有关索引的常见操作进行了简单封装,废话不多说,上代码:   Java代码   package com.yida.framework.lucene5.util;      import java.io.IOException;   import java.util.concurrent.ExecutorService;   import java.util.concurrent.locks.Lock;   import java.util.concu

10个实用的脚本代码工具_javascript技巧

下面介绍10个实用的 浏览辅助 Tidy Read 复制代码 代码如下: javascript:(function(){var s=document.createElement("script");s.charset="gb2312";s.language="javascript";s.type="text/javascript";s.src="http://tidyread.com/tidyread.js?u=&q

从 HTA 中启动应用程序_hta

如何从 HTA 中启动应用程序? 问: 您好,脚本专家!对于 HTA,有没有什么可以替代 Wscript.Shell 命令?我需要运行某个应用程序并指定要打开的文件. -- DL 答: 您好,DL.是的,我们确实知道这样的命令,可以在 HTA 中使用并可以替代 Wscript.Shell 命令,我们一会儿就会向您介绍.不过,在介绍它之前,我们应注意到您实际上可以在 HTA 中使用 Wscript.Shell 对象.这是一个常会引发混淆之处:因为您在 HTA 中无法使用某些命令(如 Wscript