Solved: Outlook Batch File

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

computerman29642

Thread Starter
Joined
Dec 4, 2007
Messages
2,895
I have a batch file that opens outlook when I login into the computer. The code below is what I have within the batch file:

Code:
start outlook.exe /m
Is there a way to modify the code to wait until the system has come up fully before executing?
 
Joined
Aug 7, 2007
Messages
9,028
Without using a 3rd party application to delay startup, you can always just add a delay in the batch file:
ping 192.168.255.1 -n 1 -w X000

Where X is the number of seconds you want to wait, so 60000 would wait 60 seconds.
The address you ping must be one that does not exist, so if you just happen to be using the 192.168.255.X range, you 'll need to change that, or make sure it's not a valid IP.

HTH

Jerry
 

computerman29642

Thread Starter
Joined
Dec 4, 2007
Messages
2,895
I have the following code...

Code:
ping 127.0.0.1 -n 1 -w 120000
start outlook.exe /m
I thought that Outlook would wait 2 minutes before opening, but it opens right away. What am I doing wrong?
 
Joined
Aug 7, 2007
Messages
9,028
I have the following code...

Code:
ping 127.0.0.1 -n 1 -w 120000
start outlook.exe /m
I thought that Outlook would wait 2 minutes before opening, but it opens right away. What am I doing wrong?
The address you ping must be one that does not exist
the -w (wait) switch tells ping how long to wait for a reply. If the address responds, the wait parameter has no affect. with th -n 1 parameter it only sends one ping, so the wait tiime will be only 1 second. If you want to use an address that responds then use -n (number of packets to send) as devil_himself has indicated. Each ping takes approximately 1 second.

Either method will work. Just a matter of preference.

Pinging the localhost address doesn't send any packets over the network, but the network card is sending and receiving the packets internally (60 bytes each, 120 bytes per ping) so it could possibly have a slight effect on sending/receiving other data, but it's not too likely.

Pinging a non-existent address sends one 60 byte packet, then waits for a timer to timeout, so the network card isn't actually processing any data. Timing with this method also seems to be less affected by other processes hogging processor time, but I have no real data to prove that one way or the other.

Jerry
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top