How can I run a custom program ASYNCHRONOUSLY when booting WinPE?

I have a custom application that I want to have running during WinPE for my Litetouch deployments. I had this working in SCCM and now I want to get it working in MDT.
I have the Netcheck.exe application in my Extras folder, it ends up on the root of my X: drive.
Here is my unattend.xml file.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="windowsPE">
        <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
            <Display>
                <ColorDepth>32</ColorDepth>
                <HorizontalResolution>1024</HorizontalResolution>
                <RefreshRate>60</RefreshRate>
                <VerticalResolution>768</VerticalResolution>
            </Display>
<RunAsynchronous>
<RunAsynchronousCommand>
<Order>1</Order>
<Path>X:\NetCheck.exe</Path>
<Description>Run the NetCheck app</Description>
</RunAsynchronousCommand>
<RunAsynchronousCommand>
<Order>2</Order>
<Path>wscript.exe X:\Deploy\Scripts\LiteTouch.wsf</Path>
<Description>Lite Touch PE</Description>
</RunAsynchronousCommand>
</RunAsynchronous>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
By default, the Litetouch.wsf file is launched synchronously, and so my Netcheck app won't run until the Litetouch wizard closes (this won't work for my needs). Also, synchronous commands are run before Asynchronous commands.  Therefore, I need to run
both my custom Netcheck app and the Litetouch wizard Asynchronously.
However, every time I use the unattend file that I pasted above, WinPE boots and then immediately reboots. If I am quick and hit F8 I get a command prompt, and then my Netcheck app and the Litetouch wizard both run (sweet!), but then when I close that cmd
prompt, WinPE shuts down (lame).
The wpeinit.log is shown below. Everything seems to look good, so what is wrong? How can I accomplish this?
2014-09-09 14:23:02.588, Info      WPEINIT is processing the unattend file [X:\unattend.xml]
2014-09-09 14:23:02.588, Info      Spent 141ms initializing removable media before unattend search
2014-09-09 14:23:02.604, Info      ==== Initializing Display Settings ====
2014-09-09 14:23:02.620, Info      Setting display resolution 1024x768x32@60: 0x00000000
2014-09-09 14:23:02.620, Info      STATUS: SUCCESS (0x00000000)
2014-09-09 14:23:02.620, Info      ==== Initializing Computer Name ====
2014-09-09 14:23:02.620, Info      Generating a random computer name
2014-09-09 14:23:02.620, Info      No computer name specified, generating a random name.
2014-09-09 14:23:02.620, Info      Renaming computer to MININT-9KBBIFF.
2014-09-09 14:23:02.620, Info      Waiting on the profiling mutex handle
2014-09-09 14:23:02.620, Info      Acquired profiling mutex
2014-09-09 14:23:02.620, Info      Service winmgmt disable: 0x00000000
2014-09-09 14:23:02.620, Info      Service winmgmt stop: 0x00000000
2014-09-09 14:23:02.620, Info      Service winmgmt enable: 0x00000000
2014-09-09 14:23:02.620, Info      Released profiling mutex
2014-09-09 14:23:02.620, Info      STATUS: SUCCESS (0x00000000)
2014-09-09 14:23:02.620, Info      ==== Initializing Virtual Memory Paging File ====
2014-09-09 14:23:02.620, Info      No WinPE page file setting specified
2014-09-09 14:23:02.635, Info      STATUS: SUCCESS (0x00000001)
2014-09-09 14:23:02.635, Info      ==== Initializing Optional Components ====
2014-09-09 14:23:02.635, Info      WinPE optional component 'Microsoft-WinPE-HTA' is present
2014-09-09 14:23:02.651, Info      WinPE optional component 'Microsoft-WinPE-MDAC' is present
2014-09-09 14:23:02.651, Info      WinPE optional component 'Microsoft-WinPE-WMI' is present
2014-09-09 14:23:02.667, Info      WinPE optional component 'Microsoft-WinPE-WSH' is present
2014-09-09 14:23:02.682, Info      STATUS: SUCCESS (0x00000000)
2014-09-09 14:23:02.682, Info      ==== Initializing Network Access and Applying Configuration ====
2014-09-09 14:23:02.682, Info      No EnableNetwork unattend setting was specified; the default action for this context is to enable networking support.
2014-09-09 14:23:02.682, Info      Global handle for profiling mutex is non-null
2014-09-09 14:23:02.682, Info      Waiting on the profiling mutex handle
2014-09-09 14:23:02.682, Info      Acquired profiling mutex
2014-09-09 14:23:02.997, Info      Install MS_MSCLIENT: 0x0004a020
2014-09-09 14:23:02.997, Info      Install MS_NETBIOS: 0x0004a020
2014-09-09 14:23:03.138, Info      Install MS_SMB: 0x0004a020
2014-09-09 14:23:03.326, Info      Install MS_TCPIP6: 0x0004a020
2014-09-09 14:23:03.702, Info      Install MS_TCPIP: 0x0004a020
2014-09-09 14:23:03.702, Info      Service dhcp start: 0x00000000
2014-09-09 14:23:03.702, Info      Service lmhosts start: 0x00000000
2014-09-09 14:23:03.827, Info      Service ikeext start: 0x00000000
2014-09-09 14:23:03.921, Info      Service mpssvc start: 0x00000000
2014-09-09 14:23:03.921, Info      Service mrxsmb10 start: 0x00000000
2014-09-09 14:23:03.921, Info      Released profiling mutex
2014-09-09 14:23:03.921, Info      Spent 1250ms installing network components
2014-09-09 14:23:04.108, Info      Installing device root\kdnic X:\windows\INF\kdnic.inf succeeded
2014-09-09 14:23:04.608, Info      Installing device vmbus\{f8615163-df3e-46c5-913f-f2d2f965ed0e} X:\windows\INF\wnetvsc.inf succeeded
2014-09-09 14:23:04.670, Info      Spent 750ms installing network drivers
2014-09-09 14:23:09.768, Info      QueryAdapterStatus: found operational adapter with DHCP address assigned.
2014-09-09 14:23:09.768, Info      Spent 5062ms confirming network initialization; status 0x00000000
2014-09-09 14:23:09.768, Info      STATUS: SUCCESS (0x00000000)
2014-09-09 14:23:09.768, Info      ==== Applying Firewall Settings ====
2014-09-09 14:23:09.768, Info      STATUS: SUCCESS (0x00000001)
2014-09-09 14:23:09.768, Info      ==== Executing Synchronous User-Provided Commands ====
2014-09-09 14:23:09.768, Info      STATUS: SUCCESS (0x00000001)
2014-09-09 14:23:09.768, Info      ==== Executing Asynchronous User-Provided Commands ====
2014-09-09 14:23:09.768, Info      Parsing RunAsynchronousCommand: 2 entries
2014-09-09 14:23:09.768, Info        Command 0: 0x00000000
2014-09-09 14:23:09.768, Info      Successfully executed command 'X:\NetCheck.exe'
2014-09-09 14:23:09.768, Info        Command 1: 0x00000000
2014-09-09 14:23:09.784, Info      Successfully executed command 'wscript.exe X:\Deploy\Scripts\LiteTouch.wsf'
2014-09-09 14:23:09.784, Info      STATUS: SUCCESS (0x00000000)
2014-09-09 14:23:09.784, Info      ==== Applying Shutdown Settings ====
2014-09-09 14:23:09.784, Info      No shutdown setting was specified
2014-09-09 14:23:09.784, Info      STATUS: SUCCESS (0x00000001)

Here is how i ended up solving my problem.
Change the unattend file to look like this:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State">
<Display>
<ColorDepth>32</ColorDepth>
<HorizontalResolution>1024</HorizontalResolution>
<RefreshRate>60</RefreshRate>
<VerticalResolution>768</VerticalResolution>
</Display>
<RunSynchronous>
<RunSynchronousCommand>
<Order>1</Order>
<Path>wscript.exe X:\Deploy.vbs</Path>
<Description>Run the .vbs file that kicks off Netcheck and the Litetouch wizard</Description>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
<cpi:offlineImage cpi:source="" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
Here is the Deploy.vbs:
Set objShell = Wscript.CreateObject("Wscript.shell")
objShell.Run "X:\Netcheck.exe", 0, false
objShell.Run "wscript.exe X:\Deploy\Scripts\LiteTouch.wsf", 0, true

Similar Messages

  • How can I run external console program, printing output to JTextPane?

    How can I run external console program, printing output to JTextPane?
    I have a console app. written in C++ and I would like to run in it from java swing app. and I would like to see its output in a JTextPane.

    I have used this article
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    to successfully pipe output from jboss batch files to a JTextPane.

  • How can i run my java program with out java language

    Hai to every one ..Iam new to java language ...am using windows xp operating system , i did not installed java language in my system .. how can i run a java program with out installing java language... Which files is requied to run java program..?
    any one can help me??

    Hai to every one ..Iam new to java language ...am
    using windows xp operating system , i did not
    installed java language in my system .. how can i run
    a java program with out installing java language...
    you ... can ... not ... do ... this
    Which files is requied to run java program..?
    any one can help me??a JVM. Download it from sun's website.
    [url http://java.sun.com/javase/downloads/index.jsp]Download JavaSE here

  • How can I run a SubVi in background when a sequence is running in the main VI

    What I want to do is this
    When I push a button on the main VI, a SubVI (#1) must run and take data.
    At the same time, a sequence, in which there are other subVIs must run.
    My problem is that the subVI #1 does not run when I push the button. The sequence is running well. How can I run both the sequence and the subVI at the simultaneously?
    Solved!
    Go to Solution.

    Hey Hugo,
    Sounds like you'll just want to do some parallel loops. I'll attach a screenshot of a VI that has a sequence where the counter goes up to 3, then restarts, each time it reads the iteration count from the subVI above. (The subVI is just a while loop with the iteration count attached to the global)
    Each iteration of the sequence shows an increased count from the subVI via a global variable.
    Is this what you are looking for?
    Keep in mind that I just threw this together to show functionality, its got a lot of rough edges to it.
    Message Edited by Chris_VH on 03-30-2009 03:59 PM
    Chris Van Horn
    Applications Engineer
    Attachments:
    iteration.jpg ‏43 KB

  • How can I run an external program from a PLSQL procedure?

    Is there a package to run an external program from PLSQL? or is there another way to do that?
    thanks.

    here there is an example about how a PL/SQL procedure can
    work with an external C program.
    http://download-east.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_pi2.htm#1003384
    Apart from that you have Java Stored Procedures option
    to carry out your task.
    Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96659.pdf
    Joel P�rez

  • How can I run a java program on Linux?

    I have JBuilder's IDE installed on my Linux partition and it works. However I don't know how to compile and test a program without it. Also I tried to install Limewire on Linux and although I've installed the Java SDK on the system. Once before I installed JBuilder and then JBuilder (I guess) installed it again. However it told me it couldn't find the Java Virtual Machine. Isn't this installed with the JDK? I am able to run programs through JBuilder so I can't see why I'd have a problem. Any answers to the above issues would be greatly appreciated.

    Go here and work out how to make a simple app to compile and run on the command line: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/unix.html#2b
    (You should find the JDK from a directory under the jbuilder directory so use that and not the /usr/local/jdk1.4 in the example.)
    Then find the classes or source code of your project and do the same thing to it.

  • How can I run the C program which will interact with user

    hi, all
    I wanna run a C program whose function is that just show a line of characters, waiting for user input and finally show what user has entered. The C can run correctly in command window. But when I use Runtime class, it can not run correctly. My question is that how I can emulate that C program just by invoking Java method. The code I have written below, thank.
          String command = "cmd /c a.exe";  // a.exe is that C program
          String s;
          try {
             Process process = Runtime.getRuntime().exec(command);
             InputStream input = process.getInputStream();
             BufferedReader bufferedReader =
                new BufferedReader(new InputStreamReader(input));
             while((s = bufferedReader.readLine()) != null)
                  System.out.println(s);
          catch(IOException e) {
             System.err.println("IOException: " + e.getMessage());
          }

    http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Process.html#getOutputStream()

  • How can i run my java program in background process?

    hi all,
    i am working on desktop monitoring so when i start my program on client machine that is visible to all but i want this program client not visible to all instead of this can be run in background process . so, nobody can see that.
    so, how i can do this ?
    pls pls help me
    thanks in advanced to helper
    regards
    maulik & ritesh

    this will run the java program in the background.It'll just use the Windows Java Console instead of the command-line console. It has nothing to do with running as a background process.
    Edit: though this might be exactly what the OP wants: not "background process" but "no DOS console".

  • How can I run an external program without quitting Firefox?

    I want to run an external program from within Firefox, much as Outlook express is run from the email button. How do I set this up?
    Firefox doesn't import my Bookmarks from the listed html file. Any cure for this?

    I don't want to run the mail program, I want to run another program.
    Maxthon allows me to do this using External Tools. Does Firefox allow me to run other programs without leaving Firefox?
    2. Firefox allows me to load an html file which contains my bookmarks, but it doesn't load the bookmarks file. is there a solution?

  • How can I call a custom javascript function when clicking on cfgrid cell.

    I would like to call a custom javascript function when
    clicking on a cell in an cfgrid (of html format). The closest thing
    I can find is to use the HREF="" attribute, but it doesn't seem to
    work with javascript inside it.
    Simple example:
    <cfgridcolumn name="Foo" header="Foo"
    href="javascript:customFunction(#ID#);">
    Do I need to tap into the underlying Ext JS funtionality? If
    so, where can I start?
    Thanks!

    Hi,
    According to your post, my understanding is that you want to hide/show list columns based on specify the permission for Users, SharePoint Groups or Active Directory Groups.
    Here is a solution from CodePlex for your reference:
    SharePoint 2013 Column & View Permission
    https://sp2013columnpermission.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How can I run a perl program from XPRESS?

    Hellos..
    Java it seems has no concept of file permissions and ownership.
    Our handbuilt IDM XML file output adapter create files OK but they seem to be owned and have default permissions of root the account that kicks off the App Server.
    We want these XML files our resource adapter (written in java) creates to be accessible by a noshell account so it can get them with scp.
    The easiest way I thought was to have a little perl script in the mix. Must I really exec() `chmod` and `chown` ?
    I notice there is the <script> </script> for javascript 'coding'... when do we get a <perl> </perl> interface for doing useful things?
    GF

    here there is an example about how a PL/SQL procedure can
    work with an external C program.
    http://download-east.oracle.com/docs/cd/A87860_01/doc/appdev.817/a76936/dbms_pi2.htm#1003384
    Apart from that you have Java Stored Procedures option
    to carry out your task.
    Java Stored Procedures Developer's Guide Contents / Search / Index / PDF
    http://download-east.oracle.com/docs/cd/B10501_01/java.920/a96659.pdf
    Joel P�rez

  • How can I run this java program? Please help.

    I have jmf installed, sunone running , the file may be in the wrong directory.
    It is in some directory nowhere near the java lang dir.
    When I try to compile or build i cant. I'm off on a basic thing.
    here is the code.
    import     javax.sound.midi.InvalidMidiDataException;
    import     javax.sound.midi.MidiDevice;
    import     javax.sound.midi.MidiSystem;
    import     javax.sound.midi.MidiUnavailableException;
    import     javax.sound.midi.Receiver;
    import     javax.sound.midi.MidiMessage;
    import     javax.sound.midi.ShortMessage;
    import     javax.sound.midi.SysexMessage;
    public class MidiNote
         /**     Flag for debugging messages.
              If true, some messages are dumped to the console
              during operation.
         private static boolean          DEBUG = false;
         public static void main(String[] args)
              try {
                   // TODO: make settable via command line
                   int     nChannel = 0;
                   int     nKey = 0;     // MIDI key number
                   int     nVelocity = 0;
                   *     Time between note on and note off event in
                   *     milliseconds. Note that on most systems, the
                   *     best resolution you can expect are 10 ms.
                   int     nDuration = 0;
                   int     nArgumentIndexOffset = 0;
                   String     strDeviceName = null;
                   if (args.length == 4)
                        strDeviceName = args[0];
                        nArgumentIndexOffset = 1;
                   else if (args.length == 3)
                        nArgumentIndexOffset = 0;
                   else
                        printUsageAndExit();
                   nKey = Integer.parseInt(args[0 + nArgumentIndexOffset]);
                   nKey = Math.min(127, Math.max(0, nKey));
                   nVelocity = Integer.parseInt(args[1 + nArgumentIndexOffset]);
                   nVelocity = Math.min(127, Math.max(0, nVelocity));
                   nDuration = Integer.parseInt(args[2 + nArgumentIndexOffset]);
                   nDuration = Math.max(0, nDuration);
                   MidiDevice     outputDevice = null;
                   Receiver     receiver = null;
                   if (strDeviceName != null)
                        MidiDevice.Info     info = getMidiDeviceInfo(strDeviceName, true);
                        if (info == null)
                             out("no device info found for name " + strDeviceName);
                             System.exit(1);
                        try
                             outputDevice = MidiSystem.getMidiDevice(info);
                             outputDevice.open();
                        catch (MidiUnavailableException e)
                             if (DEBUG) { out(e); }
                        if (outputDevice == null)
                             out("wasn't able to retrieve MidiDevice");
                             System.exit(1);
                        try
                             receiver = outputDevice.getReceiver();
                        catch (MidiUnavailableException e)
                             if (DEBUG) { out(e); }
                   else
                        /*     We retrieve a Receiver for the default
                             MidiDevice.
                        try
                             receiver = MidiSystem.getReceiver();
                        catch (MidiUnavailableException e)
                             if (DEBUG) { out(e); }
                   if (receiver == null)
                        out("wasn't able to retrieve Receiver");
                        System.exit(1);
                   /*     Here, we prepare the MIDI messages to send.
                        Obviously, one is for turning the key on and
                        one for turning it off.
                   MidiMessage     onMessage = null;
                   MidiMessage     offMessage = null;
                   try
                        onMessage = new ShortMessage();
                        offMessage = new ShortMessage();
                        ((ShortMessage) onMessage).setMessage(ShortMessage.NOTE_ON, nChannel, nKey, nVelocity);
                        ((ShortMessage) offMessage).setMessage(ShortMessage.NOTE_OFF, nChannel, nKey);
                        /* test for SysEx messages */
                        //byte[] data = { (byte) 0xF0, (byte) 0xF7, (byte) 0x99, 0x40, 0x7F, 0x40, 0x00 };
                        //onMessage = new SysexMessage();
                        //offMessage = new SysexMessage();
                        //onMessage.setMessage(data, data.length);
                        //offMessage = (SysexMessage) onMessage.clone();
                   catch (InvalidMidiDataException e)
                        if (DEBUG) { out(e); }
                   *     Turn the note on
                   receiver.send(onMessage, -1);
                   *     Wait for the specified amount of time
                   *     (the duration of the note).
                   try
                        Thread.sleep(nDuration);
                   catch (InterruptedException e)
                        if (DEBUG) { out(e); }
                   *     Turn the note off.
                   receiver.send(offMessage, -1);
                   *     Clean up.
                   receiver.close();
                   if (outputDevice != null)
                        outputDevice.close();
              } catch (Throwable t) {
                   out(t);
              System.exit(0);
         private static void printUsageAndExit()
              out("MidiNote: usage:");
              out(" java MidiNote [<device name>] <note number> <velocity> <duration>");
              out(" <device name>\toutput to named device");
              out(" -D\tenables debugging output");
              System.exit(1);
         private static void listDevicesAndExit(boolean forInput, boolean forOutput) {
              if (forInput && !forOutput) {
                   out("Available MIDI IN Devices:");
              else if (!forInput && forOutput) {
                   out("Available MIDI OUT Devices:");
              } else {
                   out("Available MIDI Devices:");
              MidiDevice.Info[]     aInfos = MidiSystem.getMidiDeviceInfo();
              for (int i = 0; i < aInfos.length; i++) {
                   try {
                        MidiDevice     device = MidiSystem.getMidiDevice(aInfos);
                        boolean          bAllowsInput = (device.getMaxTransmitters() != 0);
                        boolean          bAllowsOutput = (device.getMaxReceivers() != 0);
                        if ((bAllowsInput && forInput) || (bAllowsOutput && forOutput)) {
                             out(""+i+" "
                                  +(bAllowsInput?"IN ":" ")
                                  +(bAllowsOutput?"OUT ":" ")
                                  +aInfos[i].getName()+", "
                                  +aInfos[i].getVendor()+", "
                                  +aInfos[i].getVersion()+", "
                                  +aInfos[i].getDescription());
                   catch (MidiUnavailableException e) {
                        // device is obviously not available...
              if (aInfos.length == 0) {
                   out("[No devices available]");
              System.exit(0);
    e
         *     This method tries to return a MidiDevice.Info whose name
         *     matches the passed name. If no matching MidiDevice.Info is
         *     found, null is returned.
         *     If forOutput is true, then only output devices are searched,
         *     otherwise only input devices.
         private static MidiDevice.Info getMidiDeviceInfo(String strDeviceName, boolean forOutput) {
              MidiDevice.Info[]     aInfos = MidiSystem.getMidiDeviceInfo();
              for (int i = 0; i < aInfos.length; i++) {
                   if (aInfos[i].getName().equals(strDeviceName)) {
                        try {
                             MidiDevice device = MidiSystem.getMidiDevice(aInfos[i]);
                             boolean     bAllowsInput = (device.getMaxTransmitters() != 0);
                             boolean     bAllowsOutput = (device.getMaxReceivers() != 0);
                             if ((bAllowsOutput && forOutput) || (bAllowsInput && !forOutput)) {
                                  return aInfos[i];
                        } catch (MidiUnavailableException mue) {}
              return null;
         private static void out(String strMessage)
              System.out.println(strMessage);
         private static void out(Throwable t)
              t.printStackTrace();

    Please post your code using code tags.
    When I try to compile or build i cant.What is your question? Exactly what error message do you get?

  • How can i run applets in kawa?

    how can i run compiled applet programs in KAWA
    help me

    If you always have the external display connected, you can configure the OS to consider it as the default or main display. Once everything is connected and set to your liking (resolution, color depth, etc.), "bless" the external display by clicking & dragging the menubar from the Mac's internal display onto the external. This only works if you are not using video mirroring.
    Once this is done, applications will open by default on the external and now "main" display and you can configure them to go fullscreen or whatever.

  • How can i run the java bean sample program download from OTN

    hello to all
    i have a p[roblem. i have downloaded the sample progam from oracle web site which is a java code that connect with the oracle and shows a form. how can i run the from.
    can any body help me pleaSEEE
    thanks
    kamran ahmed                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi Darryl.Burke
    So your telling, we cannot run our Java Program when system shutdowns...In my application, when user has schedule for next days and he shutdown his PC. On the next day when System Started i should able to get back my schedule on the Specified time(I'm TimerTask class in Java)... How can i achieve this using Java? can u tell me clearly..

  • URGENT PLEASE:How can I run a a class file on the Apache server?

    Hi Guys and Gurus,
    I am seeking some favor all of experienced gurus, i.e.
    How can I run a a class file on the Apache server? Can I run through an Applet?
    How can I set Environment variables in Windows2000 Professional Environment?
    Actually, I want to extract some records from a MySQL Database running on Apache Server. I wrote a program just to select the columns and show them. It is now a Class file, Now how can I run this class file from the Server???
    The code is here
    import java.sql.*;
    public class RecordShow {
    public static void main(String args[]) {
    String url = "jdbc:mysql://localhost/myhost";
    Connection con;
    String query = "select mytable.column," +
    "from mytable " +
    "where mytable.column = 1";
    Statement stmt;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("ClassNotFoundException: ");
    System.err.println(e.getMessage());
    try {
    con = DriverManager.getConnection(url,
    "myuser", "mypassword");
    stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(query);
    ResultSetMetaData rsmd = rs.getMetaData();
    int numberOfColumns = rsmd.getColumnCount();
    int rowCount = 1;
    while (rs.next()) {
    System.out.println("Row " + rowCount + ": ");
    for (int i = 1; i <= numberOfColumns; i++) {
    System.out.print(" Column " + i + ": ");
    System.out.println(rs.getString(i));
    System.out.println("");
    rowCount++;
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.print("SQLException: ");
    System.err.println(ex.getMessage());
    Please advise... THANKS
    VJ

    Ehm, I wasn't referring to you at all... read up,
    there's a comment by jschell saying that CGI might be
    easier/better for his purposes.
    Yep.
    I know PHP/Perl/whatever might be easier for some
    purposes, but only if you happen to know them and want
    to/are able to use them. Ok. But you aren't the one asking the question are you. And the person who asked the question seems to have absolutely no familiarity with Apache or applets.
    So whatever they do they are going to have to learn a lot.
    And that does indeed suggest that in all likelyhood they have not investigated the alternatives.
    And for the vast majority of internet applications, especially with smaller projects (obvious this person is not working with a large team), using perl, or something besides java, is going to be the best business solution. It is simpler, and more secure (probably due to the fact that it is simpler.)
    Since this is a Java forum, I
    answer under the assumption that people have made a
    choice one way or another to use a Java solution to
    their problem, so I try to solve it in Java first, and
    only when that fails (very seldom) do I turn to other
    solutions.You approach problems by arbritrarily deciding to try to solve it in java first and only if you fail do you then look to other solutions?
    My first step is to try to figure out which of the various avenues is going to cost less. (And a secondary, but non-trivial concern, is then to convince the customer that just because they have heard of a buzz word like 'enterprise bean' that it doesn't mean that is a cost effective solution.) We must come from different worlds.

Maybe you are looking for