There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
DOS/PDA/Other
Tag Cloud
adware audio bios blue screen boot bsod computer connection crash dell desktop driver email error excel firefox freeze google hard drive hardware hijackthis install internet laptop linux malware network no sound outlook problem recovery router screen server slow sound speakers spyware startup trojan usb video virus vista webcam windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > DOS/PDA/Other >
Solved: Outlook Batch File

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
computerman29642's Avatar
Computer Specs
Distinguished Member with 2,565 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
06-Oct-2008, 09:03 AM #1
Question Solved: Outlook Batch File
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?
TheOutcaste's Avatar
Computer Specs
Distinguished Member with 5,315 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
06-Oct-2008, 09:58 PM #2
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
__________________
Microsoft MVP - Windows Desktop Experience
Of course I know all the answers ; I just don't always match the answers to the right questions
Are you aware of the New Signature Limitations?
computerman29642's Avatar
Computer Specs
Distinguished Member with 2,565 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
07-Oct-2008, 08:02 AM #3
Thanks Jerry.
computerman29642's Avatar
Computer Specs
Distinguished Member with 2,565 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
09-Oct-2008, 09:50 AM #4
Jerry, could I use this IP Address 127.0.0.1?
devil_himself's Avatar
Distinguished Member with 4,921 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
09-Oct-2008, 10:28 AM #5
Quote:
Originally Posted by computerman29642 View Post
Jerry, could I use this IP Address 127.0.0.1?
yes

ping -n 5 localhost

check out
http://en.wikipedia.org/wiki/Localhost

localhost always translates to the loopback IP address 127.0.0.1 in IPv4, or ::1 in IPv6
computerman29642's Avatar
Computer Specs
Distinguished Member with 2,565 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
09-Oct-2008, 11:31 AM #6
Is there a way to have the batch to wait until the system is fully up before executing?
devil_himself's Avatar
Distinguished Member with 4,921 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
09-Oct-2008, 11:39 AM #7
Quote:
Originally Posted by computerman29642 View Post
Is there a way to have the batch to wait until the system is fully up before executing?
No ..
computerman29642's Avatar
Computer Specs
Distinguished Member with 2,565 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
09-Oct-2008, 12:15 PM #8
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?
devil_himself's Avatar
Distinguished Member with 4,921 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
09-Oct-2008, 12:46 PM #9
use this
Code:
ping -n 120 localhost > nul
start outlook.exe /m
computerman29642's Avatar
Computer Specs
Distinguished Member with 2,565 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
09-Oct-2008, 01:05 PM #10
That worked, thanks.
TheOutcaste's Avatar
Computer Specs
Distinguished Member with 5,315 posts.
 
Join Date: Aug 2007
Location: Oregon, USA
Experience: Intermediate
09-Oct-2008, 06:55 PM #11
Quote:
Originally Posted by computerman29642 View Post
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?
Quote:
Originally Posted by TheOutcaste View Post
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
__________________
Microsoft MVP - Windows Desktop Experience
Of course I know all the answers ; I just don't always match the answers to the right questions
Are you aware of the New Signature Limitations?
computerman29642's Avatar
Computer Specs
Distinguished Member with 2,565 posts.
 
Join Date: Dec 2007
Location: HERE OR THERE?!?!?!
Experience: Always Learning!
10-Oct-2008, 08:04 AM #12
Thanks Jerry for the explanantion. I am going to test both methods.
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 05:56 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.