<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><br>Hi,</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">I want to run a batch file which does the same thing as a simple bash script, but a few hours of wresling with it & I'm failing miserably (from QGIS v2.2)<br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Any help appreciated.</div><div style="color: rgb(0,
 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">In Linux the action command takes 2 parameters from the QGIS action call:</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">get_catch [ %trip_code% ] [ %station_no%]</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">Under Windows, catch.bat contains:</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family:
 arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">@echo off</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">SET DB=kah1402</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">SET HOST=host</div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">SET USER=user<br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">SET TRIP=%1</div><div style="color: rgb(0, 0, 0); font-size:
 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">SET STN=%2<br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;">start "%TRIP% %STN%" /w "c:\Program Files\Postgresql\9.3\bin\psql.exe -d %DB% -h %HOST% -U %USER% -c "select species, weight from t_catch where trip_code=%TRIP%' and station_no='%STN%' order by weight desc;"</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 13.3333px; font-family: arial,helvetica,sans-serif; background-color: transparent; font-style: normal;"><br></div><div class="yui_3_7_2_166_1401739157829_60" style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"><div class="yui_3_7_2_166_1401739157829_64" style="font-family: times new roman, new york, times, serif; font-size: 12pt;">This works perfectly from the cmd.exe command line, eg, running:
 ".\catch.bat kah1402 33"<br>returns the correct data in the terminal window - now I want to invoke this from QGIS as an action, getting the parameters from the clicked feature displayed in a new terminal/command window. So far, I have been unable to get a QGIS action to open a command prompt window in Windows at all.<br><br>Any suggestions appreciated. There must be a few people out here using QGIS & Windows :-)<br> </div> </div>  <span><br>Thanks,<br> <br>  Brent Wood<br></span><div></div></div></body></html>