Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Help sending cmd loop to text file

Posted on 2013-06-10
2
Medium Priority
?
303 Views
Last Modified: 2013-06-10
Hello all, I need help sending the following windows cmd command output to text file.

I have tried the following and it only sends one of many lines of output to file.

and if possible is it possible to send it to file in a excel format?

for /f "tokens=5 delims=\" %A in ('reg query HKLM\SYSTEM\CurrentControlSet\Services') do sc qc %A > c:\test\test.txt
0
Comment
Question by:Alice7
2 Comments
 
LVL 25

Accepted Solution

by:
Ron Malmstead earned 2000 total points
ID: 39236107
for /f "tokens=5 delims=\" %A in ('reg query HKLM\SYSTEM\CurrentControlSet\Services') do sc qc %A >> c:\test\test.csv

..try that.
0
 

Author Comment

by:Alice7
ID: 39236144
That worked perfect, thank you!
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
The Internet has made sending and receiving information online a breeze. But there is also the threat of unauthorized viewing, data tampering, and phoney messages. Surprisingly, a lot of business owners do not fully understand how to use security t…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question