cannot make xp_cmdshell to run a .bat file which lauches a java program

  • My nvtest2_run.bat launches a tiny java program which simply raises an alert window.

    xp_cmdshell 'START /DE:\Downloadsvtest2vtest2 nvtest2_run.bat'

    Results:

    output

    1 NULL

    xp_cmdshell 'START /DE:\Downloadsvtest2vtest2 nvtest2_run.bat',NO_OUTPUT

    Results:

    Commands completed successfully

    ...but no alert window!

    I tested other simple batch files and they work (even one that creates a file).

    What am I doing wrong?

  • When you run the BAT file from the command prompt, does it work?

    Also, why would you want an SQL script to raise an alert window? Wouldn't the alert window pop on the server, not on the client? Or are you running this from remote desktop to the server? (Or running SQL on the desktop machine, I guess.)

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I can only assume that the java program launch batch file "runs" because other batch files run (ones that don't launch a java prog). And the other batch file tests were successfull in creating and writing to a txt file.

    The alert window is mere coincidence. It was a simple program for testing. Actually, these are tests of the functionality of a table trigger running a Talend Open Studio job for db app integration purposes. The Talend java jobs will not be raising alert windows but changing values in tables. I will test a non-graphical java job this morning and advise.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply