Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set objFSO=CreateObject("Scripting.FileSystemObject")
- oFile="userinformation.html"
- set objFile = objFSO.CreateTextFile(oFile,True)
- ' header
- objFile.Write "<html>"
- objFile.Write "<head>"
- objFile.Write "<title>User Information</title>"
- objFile.Write "<style type=""text/css"">"
- objFile.Write ".hktable {font-size:12px;color:#333333;width:900;border-width: 1px;border-color: #a9a9a9;border-collapse: collapse;}"
- objFile.Write ".hktable th {font-size:12px;background-color:#ffffff;border-width: 1px;padding: 8px;border-style: solid;border-color: #a9a9a9;text-align:left;}"
- objFile.Write ".hktable tr {background-color:#cdcdcd;}"
- objFile.Write ".hktable td {font-size:12px;border-width: 1px;padding: 8px;border-style: solid;border-color: #a9a9a9;}"
- objFile.Write "</style>"
- objFile.Write "</head>"
- objFile.Write "<body>"
- set wshShell = WScript.createobject("Wscript.Shell")
- set wshEnv = WshShell.Environment("Process")
- 'starting table
- objFile.Write "<table class=hktable border=1>"
- objFile.Write " <tr>"
- objFile.Write " <th bgcolor=#fffccc>Environment item</th>"
- objFile.Write " <th bgcolor=#fffccc>Value</th>"
- objFile.Write " </tr>"
- ' splitting the array in 2 seperate variables
- for each envitem in WshEnv
- splititem=Split(envitem,"=")
- objFile.Write " <tr>"
- objFile.Write " <th>"
- objFile.Write splititem(0)
- objFile.Write " </th>"
- objFile.Write " <th>"
- objFile.Write splititem(1)
- objFile.Write " </th>"
- objFile.Write " </tr>"
- Next
- 'footer
- objFile.Write "</body>"
- objFile.Write "</html>"
- ' start html file
- startProcess oFile
- ' subs
- sub startProcess(path)
- Dim objShell
- Set objShell = createobject("Wscript.Shell")
- objShell.Run path
- Set objShell = nothing
- end sub
Advertisement
Add Comment
Please, Sign In to add comment