On 12/31/2014 03:50 PM, Cesar Romani wrote:
>
frank.w...@gmail.com wrote:
>> ----------
>> @echo off
>> IF "%*" EQU "" (
>> start "dummy" /b C:\djvu\pdf2djvu.exe
>> ) ELSE (
>> start "dummy" /b C:\djvu\pdf2djvu.exe %*
>> )
>> ----------
> Thanks Frank, but it doesn't work. When I call it without arguments, I
> always have to press ENTER to get to the cmd shell.
I don't understand your problem because of your wording, and I can't
test my suggestions, and my memory of this language is fading, but try
this:
----------
@echo off
IF "%*" EQU "" (
start "dummy" C:\djvu\pdf2djvu.exe
) ELSE (
start "dummy" C:\djvu\pdf2djvu.exe %*
)
EXIT
----------
The change is the addition of the command EXIT and the removal of the
background switch (/b). If "pdf2djvu.exe" is a Windows application then
it doesn't need to be sent to the background, and if it is a console
application then sending it to the background will not allow the console
window to close before the application has finished. If it is a console
application then you are stuck with the console window unless you use a
third party program (or maybe CScript) which hides the window.
Frank