Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > NZ Computing > Batch file question

Reply
Thread Tools

Batch file question

 
 
mark
Guest
Posts: n/a
 
      09-07-2006


I'm wanting to open a Windows application that resides on another machine
across the network, and if that machine is not turned on I don't want the
machine to "hang" while it figures that out.

Using "\\<machine name>\<path>\<executable name>" inside a batch file
mostly does what I need, but leaves an ugle DOS window open too.

It's been ages since I've needed to use DOS batch files - is there a better
way?

Cheers,
Mark
 
Reply With Quote
 
 
 
 
GraB
Guest
Posts: n/a
 
      09-07-2006
On 8 Sep 2006 00:31:13 +1200, mark <(E-Mail Removed)> wrote:

>
>
>I'm wanting to open a Windows application that resides on another machine
>across the network, and if that machine is not turned on I don't want the
>machine to "hang" while it figures that out.
>
>Using "\\<machine name>\<path>\<executable name>" inside a batch file
>mostly does what I need, but leaves an ugle DOS window open too.
>
>It's been ages since I've needed to use DOS batch files - is there a better
>way?
>
>Cheers,
>Mark


Perhaps some kind of Windows macro programme?
http://tinyurl.com/qsdss


 
Reply With Quote
 
 
 
 
The Other Guy
Guest
Posts: n/a
 
      09-07-2006
mark wrote:
> I'm wanting to open a Windows application that resides on another machine
> across the network, and if that machine is not turned on I don't want the
> machine to "hang" while it figures that out.


How about...

ping -n 1 -w 100 %MACHINEIP%
if errorlevel 1 goto eof
REM Whatever you need to do if the machine is running
:eof

The Other Guy
 
Reply With Quote
 
Dave Taylor
Guest
Posts: n/a
 
      09-08-2006
The Other Guy <(E-Mail Removed)> wrote in news:edpo96$shu$(E-Mail Removed):

> How about...
>
> ping -n 1 -w 100 %MACHINEIP%
> if errorlevel 1 goto eof
> REM Whatever you need to do if the machine is running
>:eof
>


And an exit to close the window.

--
Ciao, Dave
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      09-08-2006
In message <Xns9838C62B41433daveytaynospamplshot@203.97.37.6> , Dave Taylor
wrote:

> The Other Guy <(E-Mail Removed)> wrote in news:edpo96$shu$(E-Mail Removed):
>
>> How about...
>>
>> ping -n 1 -w 100 %MACHINEIP%
>> if errorlevel 1 goto eof
>> REM Whatever you need to do if the machine is running
>>:eof
>>

>
> And an exit to close the window.


Can't you just run the script in the background?
 
Reply With Quote
 
mark
Guest
Posts: n/a
 
      09-08-2006
The Other Guy <(E-Mail Removed)> wrote in
news:edpo96$shu$(E-Mail Removed):

> mark wrote:
>> I'm wanting to open a Windows application that resides on another
>> machine across the network, and if that machine is not turned on I
>> don't want the machine to "hang" while it figures that out.

>
> How about...
>
> ping -n 1 -w 100 %MACHINEIP%
> if errorlevel 1 goto eof
> REM Whatever you need to do if the machine is running
>:eof
>
> The Other Guy




Cool, but not quite what I need

From my original post:

"Using "\\<machine name>\<path>\<executable name>" inside a batch file
mostly does what I need, but leaves an ugle DOS window open too."


The key bit I'm looking for it a way to close the ugly DOS window as soon
as it launches the Windows app

Cheers,
Mark

 
Reply With Quote
 
mark
Guest
Posts: n/a
 
      09-08-2006
Dave Taylor <(E-Mail Removed)> wrote in
news:Xns9838C62B41433daveytaynospamplshot@203.97.3 7.6:

> The Other Guy <(E-Mail Removed)> wrote in news:edpo96$shu$(E-Mail Removed):
>
>> How about...
>>
>> ping -n 1 -w 100 %MACHINEIP%
>> if errorlevel 1 goto eof
>> REM Whatever you need to do if the machine is running
>>:eof
>>

>
> And an exit to close the window.



Unfortunately an exit after the command doesn't close the Window (I know,
it should, but I've already tried that ).

Cheers,
Mark

 
Reply With Quote
 
mark
Guest
Posts: n/a
 
      09-08-2006
Lawrence D'Oliveiro <(E-Mail Removed)_zealand> wrote in
news:edr892$jfk$(E-Mail Removed):

> Subject: Re: Batch file question
> From: Lawrence D'Oliveiro <(E-Mail Removed)_zealand>
> Newsgroups: nz.comp
>
> In message <Xns9838C62B41433daveytaynospamplshot@203.97.37.6> , Dave
> Taylor wrote:
>
>> The Other Guy <(E-Mail Removed)> wrote in
>> news:edpo96$shu$(E-Mail Removed):
>>
>>> How about...
>>>
>>> ping -n 1 -w 100 %MACHINEIP%
>>> if errorlevel 1 goto eof
>>> REM Whatever you need to do if the machine is running
>>>:eof
>>>

>>
>> And an exit to close the window.

>
> Can't you just run the script in the background?
>
>




If runs in the background, the key point from my original post that people
have overlooked is that my batch file does what I want apart from CLOSING
ITSELF once it has launched the WIndows app, and that is the thing I have
forgotten how to do. Exit does not do the trick.

Cheers,
Mark
 
Reply With Quote
 
Lawrence D'Oliveiro
Guest
Posts: n/a
 
      09-08-2006
In message <Xns9838DF8CB52DFsometimes2003@60.234.1.32>, mark wrote:

> Lawrence D'Oliveiro <(E-Mail Removed)_zealand> wrote in
> news:edr892$jfk$(E-Mail Removed):
>
>> Subject: Re: Batch file question
>> From: Lawrence D'Oliveiro <(E-Mail Removed)_zealand>
>> Newsgroups: nz.comp
>>
>> In message <Xns9838C62B41433daveytaynospamplshot@203.97.37.6> , Dave
>> Taylor wrote:
>>
>>> The Other Guy <(E-Mail Removed)> wrote in
>>> news:edpo96$shu$(E-Mail Removed):
>>>
>>>> How about...
>>>>
>>>> ping -n 1 -w 100 %MACHINEIP%
>>>> if errorlevel 1 goto eof
>>>> REM Whatever you need to do if the machine is running
>>>>:eof
>>>>
>>>
>>> And an exit to close the window.

>>
>> Can't you just run the script in the background?
>>

>
> If runs in the background, the key point from my original post that people
> have overlooked is that my batch file does what I want apart from CLOSING
> ITSELF once it has launched the WIndows app


Why do you have to open a window in the first place? That's what I meant
by "running in the background"--no UI, no window.
 
Reply With Quote
 
mark
Guest
Posts: n/a
 
      09-08-2006
Lawrence D'Oliveiro <(E-Mail Removed)_zealand> wrote in
news:edries$6f2$(E-Mail Removed):

> Why do you have to open a window in the first place? That's what I
> meant by "running in the background"--no UI, no window.



I can use a shortcut to the batch file and set it to run minimized if that
is what you are thinking of - that would still leave an extra item sitting
on the taskbar that I'd not want there though, with the same name as the
actual program in this case, which would add to the confusion

I'm hoping someone in the news group remembers how to run a Windows app
from within a batch file, and then have the batch file quit - without
having to have it wait for the Windows app to quit before terminating.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
batch file/jar file sihle87@gmail.com Java 2 02-16-2008 01:34 AM
How to execute Jar file using Batch file. Sriram Java 1 01-31-2008 03:59 PM
creating a file within a subdir in DOS batch file =?Utf-8?B?bWF0bHlu?= ASP .Net 0 09-20-2007 01:28 PM
Batch File - Renaming File with DATE Tom Computer Support 11 03-05-2007 10:33 PM
Compilation Batch File Won't Pipe To File Luc The Perverse Java 7 10-23-2005 10:17 AM



Advertisments