-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenerateReports.bat
41 lines (34 loc) · 1.15 KB
/
GenerateReports.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@echo off
setlocal
:: Define paths and filenames
set "desktopPath=%USERPROFILE%\Desktop"
set "deviceReportPath=%desktopPath%\DeviceUsageReport.txt"
set "wifiReportPath=%desktopPath%\WifiDataUsageReport.txt"
set "htmlReportPath=%desktopPath%\UsageReports.html"
:: Generate Device Usage Report (Replace this section with your actual commands)
echo Device Usage Report > "%deviceReportPath%"
wmic computersystem get name, manufacturer, model >> "%deviceReportPath%"
:: Generate WiFi Data Usage Report (Replace this section with your actual commands)
echo WiFi Data Usage Report > "%wifiReportPath%"
netstat -e >> "%wifiReportPath%"
:: Create HTML file
(
echo ^<html^>
echo ^<head^>
echo. ^<title^>Device and WiFi Usage Reports^</title^>
echo ^</head^>
echo ^<body^>
echo. ^<h1^>Device Usage Report^</h1^>
echo. ^<pre^>
type "%deviceReportPath%"
echo. ^</pre^>
echo. ^<h1^>WiFi Data Usage Report^</h1^>
echo. ^<pre^>
type "%wifiReportPath%"
echo. ^</pre^>
echo ^</body^>
echo ^</html^>
) > "%htmlReportPath%"
:: Open the HTML report in the default web browser
start "" "%htmlReportPath%"
endlocal