|So.. I'm having a bit of trouble with something that I thought would be relatively simple.|
I'm trying to collect the Java version from a number of computers with a login script, and write that information to a txt file.
I'd like to avoid using WMIC to pull and filter the result and pull the data from the "java -version" command. The problem I'm having is in actually getting that information into a text file as the command returns a multi-lined response that just won't take into a file as I had hoped.
The command returns this:
C:\Documents and Settings\username>java -version
java version "1.6.0_14"
Java(TM) SE Runtime Environment (build 1.6.0_14-b08)
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)
When attempting to append to a text file, I get a blank document.
Am I missing something? Is this not doable in this way? Is it due to the way the java app returns the information?