Solved

How to send output to an exec command

Posted on 2006-11-01
3
214 Views
Last Modified: 2010-03-31
I am trying to modify the windows registry in my application, and I am shelling out

reg add ... command.  This always asks for confirmation Y/N after you exec the command in dos.  How can I either by pass this confirmation or send it a Y character?
0
Comment
Question by:jjacksn
3 Comments
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 200 total points
Comment Utility
Call getOutputStream on the Process and println Y to it
0
 
LVL 24

Assisted Solution

by:sciuriware
sciuriware earned 100 total points
Comment Utility
I'm not sure if that will work, but I have another approach:

create a text file named <name>.reg
then execure regedit <name>.reg

The structure of that file is obtained by running regedit interactively
and using  File->export

;JOOP!
0
 
LVL 92

Accepted Solution

by:
objects earned 200 total points
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now