Welcome Guest ( Log In | Click here to Register a free account now! )
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.![]() ![]() |
Apr 15 2008, 09:51 PM
Post
#1
|
|
|
Big Brother is Watching You ![]() ![]() ![]() ![]() ![]() ![]() Group: HJT Senior Classmen Posts: 1,713 Joined: 17-January 08 From: Airstrip One Member No.: 184,215 |
I have written a tool outlined here: http://www.bleepingcomputer.com/forums/ind...logid=1249& to help around here at BC. I want to convert my tool to C++ instead of batch files. The reason? I need to have string manipulation to par down the event logs to something that fits in a post. Long story short, in a batch file, I can use the > or >> operators to redirect stdout of a program to a text file. I have already tried something like CODE system("ipconfig /all >> c:\report.txt"); and it does not work. Any ideas on redirecting the output of a external program call in C/C++? Billy3 -------------------- In the event I fail to reply within twenty-four hours, feel free to send me a PM.
Have I helped you? If so, please sign My Guestboox to help me get into college! Join BC.com's Folding Team (#38444)! Help Stanford University find a cure for diseases! ![]() |
|
|
|
Apr 16 2008, 04:56 PM
Post
#2
|
|
|
Big Brother is Watching You ![]() ![]() ![]() ![]() ![]() ![]() Group: HJT Senior Classmen Posts: 1,713 Joined: 17-January 08 From: Airstrip One Member No.: 184,215 |
Alright... I figured it out. Now I want to kick myself. This is wrong:
CODE system("ipconfig /all >> c:\report.txt"); this is correct CODE system("ipconfig /all >> C:\\report.txt"); Thanks anyway all! Billy3 -------------------- In the event I fail to reply within twenty-four hours, feel free to send me a PM.
Have I helped you? If so, please sign My Guestboox to help me get into college! Join BC.com's Folding Team (#38444)! Help Stanford University find a cure for diseases! ![]() |
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 5th July 2008 - 04:55 PM |