You can use a script instead: (Like this one I got from a colleague) === wait_for.cmd === @ECHO OFF :Loop ping -n 5 127.0.0.1 >NUL tasklist.exe /FI "IMAGENAME eq %1" 2>NUL | find.exe "PID" >NUL || GOTO Continue GOTO Loop :Continue ===
Call the script with the exe you wait for: wait_for.cmd firefox.exe /David David Petterson <da...@ifm.liu.se> Phone: +46(0)13-28 2617 Systems Administrator Department of Physics, Chemistry and Biology at Linköping University Office: F F202 SE 581 83 Linköping, Sweden On 2011-05-20 10:09, LAPLAUD François wrote: > Hi again for another question... > > > > I would like to install a package only if a specific process is not running. > > I read http://wpkg.org/Script_for_checking_if_a_process_is_already_running > but it is explained for win2000 OS. > > > > I want to try it on XP and Seven. > > > > I tried to add this line in my package.xml file. > > > > <install cmd='%COMSPEC% /c %SystemRoot%\system32\tasklist.exe /FI "IMAGENAME > eq firefox.exe" 2>NUL | %SystemRoot%\system32\find.exe /I /N "firefox.exe" > >NUL'/> > > > > But it always return 1 > > This command line works in a shell but not in wpkg. Does anyone of you have > an idea of what is wrong ? (maybe the pipe is not possible, nor the > redirection (>) ? > > > > Thanks > > Laplaud François > > Service Informatique & Transmission > > Service Départemental d'Incendie et de Secours de la Sarthe > > 13, Boulevard Saint Michel > > 72190 Coulaines BP 35 > > Tel : 02.43.54.66.06 > > Fax: 02.43.74.37.61 > > P Je pense ENVIRONNEMENT: ai-je vraiment besoin d'imprimer ce message ? > > > > > > > ------------------------------------------------------------------------- > wpkg-users mailing list archives >> > http://lists.wpkg.org/pipermail/wpkg-users/ > _______________________________________________ > wpkg-users mailing list > wpkg-users@lists.wpkg.org > http://lists.wpkg.org/mailman/listinfo/wpkg-users
------------------------------------------------------------------------- wpkg-users mailing list archives >> http://lists.wpkg.org/pipermail/wpkg-users/ _______________________________________________ wpkg-users mailing list wpkg-users@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/wpkg-users