I'm currently trying to write a simple batch script that will run a series of windows commands and output them nicely into a single html file.
the command im running for example, is netsh firewall show config, Looks something like this:
Domain profile configuration (current):
-------------------------------------------------------------------
Operational mode = Enable
Exception mode = Enable
Multicast/broadcast response mode = Enable
Notification mode = Enable
Service configuration for Domain profile:
Mode Customized Name
Notice the nice spacing used that makes it easy to see?
I'm trying to keep that in the HTML file that i create. So far, i have a simple batch script as follows:
@echo off
echo ^<font face="courier new" size="2"^>^ >>index.html
netsh firewall show config >> netsh
type netsh >>index.html
When that spools to an index.html file, the resultant output looks something like this:
Domain profile configuration (current): -----------------------------------------------
-------------------- Operational mode = Enable Exception mode = Enable
Multicast/broadcast response mode = Enable Notification mode = Enable Service
configuration for Domain profile: Mode Customized Name ------------------------------
------------------------------------ Enable No File and Printer Sharing Allowed\
programs configuration for Domain profile: Mode Traffic
So does anyone know how i can output the command in a nice way, such that the formatting is kept? Its really just a bunch of spaces and breaks.
Appreciate your help in advance!