批处理文件到html报告生成器: [英] Batch file to html report generator:

查看:88
本文介绍了批处理文件到html报告生成器:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想根据我运行的批处理文件创建报告。


我创建了一个批处理文件来为这个PC调整服务运行一些程序我在大学工作。  这主要是"为了自己的利益而学习"。项目,但如果它的工作和看起来不错,我想让我的同事
。  


以下是我到目前为止的批次:


@echo off



:start

echo。

echo你需要安装

echo  Microsoft Antivirus?

echo类型y / n(小写)

set / p antivirus =

if%antivirus%== y goto msantivirus

if% antivirus%== n goto mbam

goto start



:msantivirus

echo ProgramFiles(x86)var:

如果没有定义ProgramFiles(x86)(

   start mseinstall32.exe 

) 

else(

  启动mseinstall64.exe 






:mbam

echo。

echo您是否需要安装

echo  Malwarebytes?

echo类型y / n(小写)

set / p malwarebytes =

if%malwarebytes%== y start  mbam-setup-2.0.2.1012.exe

如果%malwarebytes%== n goto cleaner

goto mbam





:清洁器

echo。

echo你需要安装

echo  CCleaner?

echo类型y / n(小写)

set / p CCleaner =

if%CCleaner%== y start  start ccsetup416.exe

if%CCleaner%== n goto msconfig

goto cleaner





: msconfig

echo。

echo你需要运行

echo  MSCONFIG?

echo类型y / n(小写)

set / p microsoftconfig =

if%microsoftconfig%== y start msconfig

if%microsoftconfig%== n goto打印

转到msconfig



:打印

echo。

echo你想要打印

echo 报告?

echo类型y / n(小写)

set / p print =

if%print%== y start(我不知道该怎么做)

if%print%== n goto done

goto done



:已完成
echo。

echo您已完成Zonetech扫描。按任意键退出。

暂停> null


这是我对HTML的看法(基于另一个网站我这样做了一些剩余的东西):


<!DOCTYPE html>

< html>

< HEAD>  

< title>区域技术计算机健康表格< / title>

< meta name =" viewport" content =" width = device-width,initial-scale = 1.0">

< link href =" CSS / bootstrap.min.css" rel =" stylesheet">

< link href =" css / styles.css" rel =" stylesheet">

< / head>



< body>  

< div class =" navbar navbar-inverse navbar-static-top">

< div class =" container">

< a href ="#" class =" navbar-brand"> BOISE STATE UNIVERSITY ZONE TECH< / a>

< button class =" navbar-toggle" data-toggle =" collapse" data-target =" .navHeaderCollapse">

< span class =" icon-bar"> < / span>

< span class =" icon-bar"> < / span>

< span class =" icon-bar">  < / span>

< span class =" icon-bar"> < / span>

< span class =" icon-bar">  < / span>

< / button>



< div class =" collapse navbar-collapse navHeaderCollapse">







< ul class = " nav navbar-nav navbar-right">



< li class =" active">< a href ="#"> Home< / a>< / li>



< li>< a href = "#"> Blog< b class =" caret">< / b>< / a>< / li>



< li cla ss =" dropdown">

< a href ="#" class =" dropdown-toggle" data-toggle =" dropdown">社交媒体< / a>

< ul class =" dropdown-menu" ;>

< li> < a href ="#"> Twiter< / a>< / li>

< li> < a href ="#"> Facebook< / a>< / li>

< li> < a href ="#"> Google +< / a>< / li>

<李> < a href ="#"> Instagram< / a>< / li>



< / ul>

< ; / li>





< li>< a href ="#">关于< / a>< / li>

< li>< a href =" #contact"数据肘节= QUOT;模态" >联系< / a>< / li>





< / ul>



< / div>

< / div>

< / div>



< div class =" container text-center">

< div class =" jumbotron">

< h1>计算机健康报告< / h1>
$


< img src =" img / smallerbroncologo。 PNG" />



< / div>

< / div>



< div class =" container" >

< div class =" row">

< div class =" col-md-3">

< h3>< a href ="#">病毒扫描< / a>< / h3>

< p>病毒扫描检查您的计算机是否存在任何恶意软件。< / p>

< a href ="#" class =" btn btn-default" >读取moe< / a>



< / div>



< div class =" col-md-3">

< h3> ;< a href ="#">广告软件扫描< / a>< / h3>

< ; p>我们检查您的计算机是否有可能将自己视为"修复"的合法服务的程序。您的计算机是用于重定向互联网浏览器的资金或网站。< / p>

< a href ="#" ; class =" btn btn-default" >读取moe< / a>



< / div>



< div class =" col-md-3">

< h3> ;< a href ="#">注册管理机构扫描< / a>< / h3>

< ; p>有时您安装的程序无法正确卸载或完全卸载。   Othertimes您的程序可能会停止工作,因为注册表中存在错误的信息。  我们清理并优化注册表
以帮助您的计算机更好地工作< / p>

< a href ="#" class =" btn btn-default" >读取moe< / a>



< / div>



< div class =" col-md-3">

< h3> ;< a href ="#">启动扫描< / a>< / h3>

< p>如果您的计算机启动缓慢,有时原因是许多程序在Windows启动时尝试启动。  如果许多程序试图立即启动它会阻塞计算机处理器并使
运行缓慢。 &NBSP;我们检查以确保只有基本程序正在运行,以便您的计算机运行得更好。< / p>

< a href ="#" class =" btn btn-default" >读取moe< / a>



< / div>







< / div>

< / div>




< div class =" navbar navbar-inverse navbar-fixed-bottom" >
$


< div class =" container" >

< p class =" navbar-text pull-left">网站由Travis< / p>



< / div>



< / div>



< div class =" modal fade" id =" contact" role =" dialog">

< div class = class" modal-dialog">

< div class =" modal-content">

< div class =" modal-header">

< p>联系技术网站< / p>



< / div>

< div class =" modal-body" >

< p> Lorem Ipsum的段落有很多变化,但大多数都有某种形式的变化,通过注入幽默,或者看起来甚至不太可信的随机单词。如果你是
要使用一段Lorem Ipsum,你需要确保在文本中间没有隐藏任何尴尬。互联网上的所有Lorem Ipsum生成器都倾向于根据需要重复预定义的块,使其成为互联网上
的第一个真正的生成器。它使用超过200个拉丁词的字典,结合少数模型句子结构,生成看起来合理的Lorem Ipsum。因此,生成的Lorem Ipsum始终没有< / p>

< / div>

< div class =" footer">

< a class =" btn btn-default" data-dismiss =" modal" >关闭< / a>



< a class =" btn btn-primary" ; data-dismiss =" modal" >关闭< / a>





< / div>

< / div>

< / div>

< / div>



< script src =" http://ajax.googleapis.com/ajax/libs/jquery/latest/jquery.js"> < / script>

< script src =" js / bootstrap.js"> < / script>



< / body>

< / HTML>


这是我想要做的事情:


我想根据HTML网站制作一个交互式html报告我做了。  我想对字符串(anitivirus,malwarebytes,ccleaner和Microsoftconfig来自批处理)的y(意思是肯定)输入进行处理,并使它们表明在我创建的HTML上已经完成了
。  基本上,我看到是的输入在我的HTML文档的与我在批处理中运行的程序相关的部分中放置了复选标记(或其他内容)。   HTML页面中的部分称为病毒扫描,
广告软件扫描,注册表扫描和启动扫描,它们与变量防病毒,恶意软件,ccleaner和microsoftconfig配对。  


我希望这是有道理的。


感谢您的帮助






解决方案

你无法使用批处理文件执行HTML。


从这里开始:
http://technet.microsoft.com/en-us/scriptcenter/dd742317



I want to create reports based of the batch file that I run.

I created a batch file to run a number of programs for this PC tune up service that we do at the University I work at.  This is mostly a "learn for my own benefit" project, but if it works and looks nice I would like to make it availible to my co workers.  

Here is what I have so far for the batch:

@echo off

:start
echo.
echo Do you need to install
echo  Microsoft Antivirus?
echo Type y / n (lowercase)
set /p antivirus=
if %antivirus%== y goto msantivirus
if %antivirus%== n goto mbam
goto start

:msantivirus
echo ProgramFiles(x86) var:
if not defined ProgramFiles(x86) (
    start mseinstall32.exe 

else (
    start mseinstall64.exe 
)


:mbam
echo.
echo Do you need to install
echo  Malwarebytes?
echo Type y / n (lowercase)
set /p malwarebytes=
if %malwarebytes%== y start  mbam-setup-2.0.2.1012.exe
if %malwarebytes%== n goto cleaner
goto mbam


:cleaner
echo.
echo Do you need to install
echo  CCleaner?
echo Type y / n (lowercase)
set /p CCleaner=
if %CCleaner%== y start  start ccsetup416.exe
if %CCleaner%== n goto msconfig
goto cleaner


:msconfig
echo.
echo Do you need to run
echo  MSCONFIG?
echo Type y / n (lowercase)
set /p microsoftconfig=
if %microsoftconfig%== y start msconfig
if %microsoftconfig%== n goto print
goto msconfig

:print
echo.
echo Do you want to print
echo  a report?
echo Type y / n (lowercase)
set /p print=
if %print%== y start (i don't know what to do here)
if %print%== n goto done
goto done

:done
echo.
echo You have finished the Zonetech scan. Press any key to exit.
pause >null

Here is what I have for the HTML (its based of another site I made so there is some leftover stuff in it):

<!DOCTYPE html>
<html>
<head>  
<title> Zone Tech Computer Health Form </title>
<meta name= "viewport" content="width=device-width, initial-scale=1.0">
<link href= "css/bootstrap.min.css" rel= "stylesheet">
<link href= "css/styles.css" rel= "stylesheet">
</head>

<body>  
<div class="navbar navbar-inverse navbar-static-top">
<div class= "container">
<a href= "#" class= "navbar-brand"> BOISE STATE UNIVERSITY ZONE TECH</a>
<button class = "navbar-toggle" data-toggle = "collapse" data-target = ".navHeaderCollapse">
<span class = "icon-bar"> </span>
<span class = "icon-bar"> </span>
<span class = "icon-bar">  </span>
<span class = "icon-bar"> </span>
<span class = "icon-bar">  </span>
</button>

<div class= "collapse navbar-collapse navHeaderCollapse">



<ul class = "nav navbar-nav navbar-right">

<li class= "active"><a href = "#">Home</a></li>

<li><a href = "#">Blog <b class= "caret"></b></a></li>

<li class = "dropdown">
<a href = "#" class = "dropdown-toggle" data-toggle = "dropdown">Social Media</a>
<ul class = "dropdown-menu">
<li> <a href = "#">Twiter</a></li>
<li> <a href = "#">Facebook</a></li>
<li> <a href = "#">Google +</a></li>
<li> <a href = "#">Instagram</a></li>

</ul>
</li>


<li><a href = "#">About</a></li>
<li><a href = "#contact" data-toggle="modal" >Contact</a></li>


</ul>

</div>
</div>
</div>

<div class = "container text-center">
<div class ="jumbotron">
<h1> Computer Health Report</h1>

<img src="img/smallerbroncologo.png" />

</div>
</div>

<div class= "container" >
<div class = "row">
<div class = "col-md-3">
<h3><a href = "#">Virus Scan </a></h3>
<p>A Virus Scan checks your computer to see if any malicious software is present.</p>
<a href = "#" class = "btn btn-default" > read moe </a>

</div>

<div class = "col-md-3">
<h3><a href = "#">Adware Scan </a></h3>
<p>We check your computer for programs that may present themselves as legitimate services to "repair" your computer for money or sites that redirect your internet browser.</p>
<a href = "#" class = "btn btn-default" > read moe </a>

</div>

<div class = "col-md-3">
<h3><a href = "#">Registry Scan </a></h3>
<p>Sometimes programs you have installed don't uninstall right or fully.  Othertimes your programs may stop working because there is wrong infomration in the registry.  We clean and optimize the registry to help make your computer work better</p>
<a href = "#" class = "btn btn-default" > read moe </a>

</div>

<div class = "col-md-3">
<h3><a href = "#">Start Up Scan </a></h3>
<p>If your computer is booting slowly, sometimes the cause is to many programs trying to start up when windows starts up.  If to many programs try to start up at once it clogs up the computers processor and makes it run slow.   We check to make sure that only the essential programs are running so your computer runs better.</p>
<a href = "#" class = "btn btn-default" > read moe </a>

</div>



</div>
</div>

<div class = "navbar navbar-inverse navbar-fixed-bottom" >

<div class = "container" >
<p class = "navbar-text pull-left"> Site by Travis </p>

</div>

</div>

<div class = "modal fade" id = "contact" role = "dialog">
<div class = class "modal-dialog">
<div class = "modal-content">
<div class = "modal-header">
<p> Contact Tech Site </p>

</div>
<div class= "modal-body" >
<p>There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from  </p>
</div>
<div class = "footer">
<a class= "btn btn-default" data-dismiss = "modal" >close</a>

<a class= "btn btn-primary" data-dismiss = "modal" >close</a>


</div>
</div>
</div>
</div>

<script src="http://ajax.googleapis.com/ajax/libs/jquery/latest/jquery.js"> </script>
<script src="js/bootstrap.js"> </script>

</body>
</html>

Here is what I want to do:

I want to make an interactive html report based on an HTML site I made.  I want to take the y (meaning yes) inputs for the strings( anitivirus, malwarebytes, ccleaner, and Microsoftconfig which are from the batch) and make them indicate something has been done on the HTML that I created.  Essentially, I see the yes inputs putting check marks (or something) in the sections of my HTML document that are related to the programs I ran in the batch.  The sections in the HTML page are called Virus Scan, Adware Scan, Registry Scan, and Start up scan and they are paired to the variables antivirus, malwarebytes, ccleaner, and microsoftconfig.  

I hope this makes sense.

Thanks for any help


解决方案

You cannot do HTML with a batch file.

Start here: http://technet.microsoft.com/en-us/scriptcenter/dd742317


这篇关于批处理文件到html报告生成器:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆