Need to start Outlook after a batch file has run....

  • Thread starter Thread starter RDI
  • Start date Start date
R

RDI

......so I put the actual call to Outllook at the end of the batch file.
Everything works EXCEPT the cmd window doesn't close until I close Outlook.
I even tried putting a cls above and below the outlook call (think that
maybe there was some text showing up that I didn't notice).

The reason for doing this is that I need to guarantee that certain issues
get taken care of PRIOR to Outlook starting.

TIA

cls
"C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE" /recycle
cls
 
Use START

Enter this at the command prompt for info:

START /?

Ray at work
 
What does "it didn't work" mean? Do you get an error? Do you get
unexpected behavior? What command did you enter?
 
start "C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE /recycle"
just starts another dos window (same as Start>Run>cmd.exe).

start "%allusersprofile%\Start Menu\Programs\Microsoft Outlook.lnk"
just does the same thing as above.
 
The first argument of START is the title of the window to launch.
START /?:
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]


Try:

start "" "d:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE" /recycle

--
Ray at work
Microsoft ASP MVP
 
Thanks.

Usually the brackets indicate OPTIONAL and therefore I didn't think the
title was required.

This worked:
start "" "C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE" /recycle

Ray at said:
The first argument of START is the title of the window to launch.
START /?:
START ["title"] [/Dpath] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/WAIT] [/B] [command/program]


Try:

start "" "d:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE" /recycle

--
Ray at work
Microsoft ASP MVP




RDI said:
start "C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE /recycle"
just starts another dos window (same as Start>Run>cmd.exe).

start "%allusersprofile%\Start Menu\Programs\Microsoft Outlook.lnk"
just does the same thing as above.

"Ray at <%=sLocation%> [MVP]" <myFirstNameATlane34dotKOMM> wrote in message
 
RDI said:
Usually the brackets indicate OPTIONAL and therefore I didn't think the
title was required.

This worked:
start "" "C:\Program Files\Microsoft Office\Office10\OUTLOOK.EXE" /recycle

It's sort-of optional--if you don't use quotes, it uses the first
non-switch argument as the program to run or file to open.

Compare

start "notepad"
start notepad

I'm not saying that makes much sense, though.
 
It's really odd that the command argument is optional, I think. ?

Ray at work
 
Open a command prompt window and type:

start

(In XP at least) This will open another cmd window, as if %comspec% is the
default command argument.

I am not sure which is better - to get another window, or to get an error
message. I guess it depends on how often you want to open up multiple
command windows from a command prompt.


/Al

Ray at said:
It's really odd that the command argument is optional, I think. ?

Ray at work
 
I think that I'd prefer the error and have to use "start cmd" to open a new
cmd window, but I guess I'll live with the way it is until I write my own
operating system. ;]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top