|
Answer» 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.csvGather all your data into separate variables and then echo all of them at once to the CSV file.
Code: [Select]Echo %computername%,%regquery%,%date%,%time% >>C:\reg_output.csvAlso posted on TechGuy.org on November 17th. Foxidrive replied back that day but the OP did not respond back again until today. http://forums.techguy.org/dos-other/1137586-output-two-values-batch-log.html
|