I do love a bit of batch scripting :-)

Unfortunately I can only use JScript (!), VBScript or PowerShell in my
console, but it could be adapted with a bit of time and effort. If nothing
simpler turns up, it'll definitely be something like this I will use.

Cheers,



JR


On 25 April 2013 14:23, Kennedy, Jim <[email protected]> wrote:

> " The other problem I've got is looping the routine enough to give it time
> for the network to connect"
>
>
> :START
> PING -n 1 192.168.1.1|find "Reply from " >NUL
> IF NOT ERRORLEVEL 1 goto :SUCCESS
> IF     ERRORLEVEL 1 goto :FAIL
>
> :FAIL
> ping 192.0.2.2 -n 1 -w 10000 > nul  (or some other non-existent address,
> will wait for 10 seconds)
> goto :START
>
> :SUCCESS
> Run your process
> :END
>
>
> Might want to add a counter in there, so it exits after a certain number
> of tries. Set the whole thing as a startup scheduled task.
>
>
>
> -----Original Message-----
> From: Kennedy, Jim
> Sent: Thursday, April 25, 2013 9:19 AM
> To: NT System Admin Issues
> Subject: RE: Startup processes
>
> Along Joseph's lines....if you can control the process you are running on
> startup from a command line.
>
>
> ECHO Checking connection, please wait...
> PING -n 1 192.168.1.1|find "Reply from " >NUL
> IF NOT ERRORLEVEL 1 goto :SUCCESS
> IF     ERRORLEVEL 1 goto :FAIL
>
> :FAIL
> Goto :End (or whatever you want to do)
>
> :SUCCESS
> Run your process
> :END
>
>
>
>
>
>
> -----Original Message-----
> From: Joseph L. Casale [mailto:[email protected]]
> Sent: Thursday, April 25, 2013 9:14 AM
> To: NT System Admin Issues
> Subject: RE: Startup processes
>
> If you can query for the process, can you not query the network?
> Lookup the gateway and ping it...
> ________________________________________
> From: [email protected]
> Sent: Thursday, April 25, 2013 6:11 AM
> To: NT System Admin Issues
> Subject: Startup processes
>
> On a Windows system, is there a process that runs on startup that will
> only run if there is network connectivity present? I've got a strange
> requirement and I need to be able to tell when the network is available, if
> possible.
>
> TIA,
>
>
> JR
>
>
> Sent from my Blackberry, which may be an antique but delivers email
> RELIABLY
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <
> http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe ntsysadmin
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <
> http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe ntsysadmin
>
>
> ~ Finally, powerful endpoint security that ISN'T a resource hog! ~
> ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~
>
> ---
> To manage subscriptions click here:
> http://lyris.sunbelt-software.com/read/my_forums/
> or send an email to [email protected]
> with the body: unsubscribe ntsysadmin
>
>


-- 
*James Rankin*
Technical Consultant (ACA, CCA, MCTS)
http://appsensebigot.blogspot.co.uk

~ Finally, powerful endpoint security that ISN'T a resource hog! ~
~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/>  ~

---
To manage subscriptions click here: 
http://lyris.sunbelt-software.com/read/my_forums/
or send an email to [email protected]
with the body: unsubscribe ntsysadmin

Reply via email to