gaffneyr
asked on
NT Registry Read
I have need to test a value in the Windows NT registry. Is there a way to do this from within Java?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
public class Bat {
public static void main(String args[]) throws Exception {
Runtime r = Runtime.getRuntime();
r.exec("regedit");
}
}
public static void main(String args[]) throws Exception {
Runtime r = Runtime.getRuntime();
r.exec("regedit");
}
}
ASKER
The reason why I want to read the NT registry is that we are have a problem where registry values are being over written in the course of the program and we need a tool to track the problem down. Thanks for your help.
Hi gaffneyr && erlingd
class Reg {
public static void main(String args[]){
System.execute("Regedit.ex e") ;
}
}
It first it won't compile.
There is no execute() method in
System class.
How Ur problem is solved ??
U have to use Runtime method's execute() only as in my commnet.
:)
class Reg {
public static void main(String args[]){
System.execute("Regedit.ex
}
}
It first it won't compile.
There is no execute() method in
System class.
How Ur problem is solved ??
U have to use Runtime method's execute() only as in my commnet.
:)
Sorry ravindra76 - I was to quick :(
did not test it - before sending !
did not test it - before sending !
Hi gaffneyr,
Did ravindra76's comment solve your problem?
darinw
Customer Service
Did ravindra76's comment solve your problem?
darinw
Customer Service
ASKER
Thanks for your help. ravindra permits me to start REGEDIT but I still don't know any way to actually read the registry using only Java. Cay Horstmann's Core Java volume II has sample code to do this using JNI and C++.
Hmmm.
I credited your account with the points you used on this question so that you can post a new question. Be careful not to accept an answer until the problem you have posted is solved/answered/addressed.
darinw
Customer Service
I credited your account with the points you used on this question so that you can post a new question. Be careful not to accept an answer until the problem you have posted is solved/answered/addressed.
darinw
Customer Service
Hi darinw ,
You can debt my points in this question.
Sorry for distrubing You
:)
What exactly u want to do? Do u want to Install the Software and want to register tne No in registry? or just want to check it?
Rajiv