Greetings Everyone,
To begin with, I extremely suck at doing batch scripting, so pardon my lack of understanding in this field.
I am attempting to output certain values to a .CSV file, however, I am unable to to get them separated into 4 columns.
Ideally, I would like to have the time-stamp of this activity logged onto another column of the CSV file as well.
The output should look something like this:
Column A
Hostname
TEST-PC01
Column B
Queried "START" value of "HKLM\SYSTEM\CurrentControlSet\Services\USBSTOR" from registry
Column C
DATE
DD/MM/YYYY
Column D
TIME
14:00
Below is what I have thus far :
@echo off
echo %computername%/%username% >>C:\reg_output.csv
echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~>>C:\reg_output.csv
reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\USBSTOR" /v "Start">>C:\reg_output.csv
echo>>C:\reg_output.csv