473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Redirect Output from a script/batch to database

Hi, I know that you can output script information or batch file information into a txt file, but is it possible to direct to a database table?
Jan 24 '08 #1
3 1399
debasisdas
8,127 Expert 4TB
what is the script output and which database ?
Jan 25 '08 #2
Killer42
8,435 Expert 8TB
Hi, I know that you can output script information or batch file information into a txt file, but is it possible to direct to a database table?
My best guess would be "not directly". You'd probably need to feed it to a program which would place it in the database. Either by redirecting (>) it to a file and having the program read the file, or by piping (|) the output directly to the program.
Jan 27 '08 #3
Actually it is using powercfg.exe
If i do powercfg.exe /query >> results.txt in a batch file, the results are:

Field Description Value
----------------- -----
Name Home/Office Desk
Numerical ID 0
Turn off monitor (AC) After 20 mins
Turn off monitor (DC) After 5 mins
Turn off hard disks (AC) Never
Turn off hard disks (DC) After 10 mins
System standby (AC) Never
System standby (DC) After 5 mins
System hibernates (AC) Never
System hibernates (DC) Never
Processor Throttle (AC) NONE
Processor Throttle (DC) ADAPTIVE

What I need, is for all of the "Field Descriptions" to be columns, and Values, to be the Values, hence:
Name Numerical ID TurnOffMonitor . .
Home/Office Desk 0 After 20 ...

I will be querying multiple computers . . .
Any Suggestions?
Feb 1 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Tim Stokes | last post by:
Hi all, I want to do a similar action to response.redirect ("file.htm"). But the file.htm contains some sensitive data. I have placed file.htm in a folder in the InetPub...
5
by: Boris Nikolaevich | last post by:
This is backwards of what I usually want--normally if you have a long-running ASP script, it's a good idea to check to see whether the client is still connected so you can cancel execution. ...
7
by: Donna Hawkins | last post by:
I want to use javascript to redirect to a URL which has been passed as a variable (in php). I have searched but cannot find any solution. I think this code is a basic redirect: <script...
3
by: Prasad | last post by:
Hi, I have a batch file which does file manipulation, I need to call this batch file using asp.net and display the o/p of the command e.g the copy command o/p of the batch file on the browser....
5
by: Paul O. Morris | last post by:
Is there a script that I can run to stop a particular SQL server service on Win2003 server? I'm looking for a similar script to restart that service as well. Thanks.
9
by: Karl Irvin | last post by:
Does anyone have an example of an FTP script or module for use with Access 2003. I need to send a file from by computer to my web host from within Access. The from folder may or may not be the...
7
by: Nananana | last post by:
Hi. I have 2 DB2 statements: connect select How can I create a batch file and redirect the output to a file? I would like something like this:
10
by: Jef Driesen | last post by:
I wrote a program that writes a large amount of information to stdout (and stderr). When run from the commandline, this output either appears on the console window (the default) or can be...
14
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, In my windows applicationm, i need to excute a batch file. this batch file throws some text and questions to the screen, i need to catch the standard Output, check if it's a question, in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.