Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Andynoff
    Guest

    Command Line Close

    I'm running a VBS script that backs up my system and I need to close Outlook 98 to allow the script to run to completion. Is there any way Outlook 98 can be closed from the command line?

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Roanoke area, Virginia, USA
    Posts
    3,729
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command Line Close

    yes, but it doesn't always close properly and leaves the hidden stub running.

    i don't recall the command, it's been too long since i played last.

  3. #3
    Andynoff
    Guest

    Re: Command Line Close

    Perhaps someone will remember the command syntax.

    regards, Andy

  4. #4
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command Line Close

    <A target="_blank" HREF=http://www.jsiinc.com/suba/tip0400/rh0431.htm>Tip 431 at JSI</A> refers to 2 things:

    KILL from the NT Resource Kit
    and
    Close freeware to "gracefully stop an application from the command line or batch."

  5. #5
    Andynoff
    Guest

    Re: Command Line Close

    I tried to use KILL, but it freezes my PC half the time. (I haven't tried CLOSE -- I'll try that next.) It seems that Outlook 98 does not cede gracefully. That's why I'm hoping for an OUTLOOK.EXE command-line method. I'm thinking that MS must have built in _some_ way to close the darned thing so as to allow backup of the PST file from the network. (With Outlook running, the PST file is locked.)

  6. #6
    Andynoff
    Guest

    Re: Command Line Close

    I tried CLOSE, but it won't work for two reasons:

    1. I place the Outlook icon in the system tray using TRAYER.EXE (<A target="_blank" HREF=http://www.kfsoft.com/trayer/intro.htm>http://www.kfsoft.com/trayer/intro.htm</A>) and CLOSE can't access windows on the tray. (OTOH, KILL can.)

    2. CLOSE refers to a window by the initial characters of its name -- if I understood correctly, the window name is limited to a trailing wildcard. The initial characters of the Outlook window are the active folder, which can't be guessed by a script.

  7. #7
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Roanoke area, Virginia, USA
    Posts
    3,729
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command Line Close

    correct on 2 - you need to access it using outlook.exe for any utility to work, since you can't guess the title bar.

    i'll have to dig out the old scripts i used and see how i did it. i didn't use vbs, but i'm wondering if you could create an outlook object then close it and have it close your currently running one using vbs. this would avoid the need to have another utility installed too.

    the command line i used was about as good <img src=/S/smile.gif border=0 alt=smile width=15 height=15> as kill. it didn't exit cleanly and often left mapi running.

  8. #8
    Andynoff
    Guest

    Re: Command Line Close

    I'd sure appreciate it if you could find something in your files (dare I say your Outlook folders? <g>).

    Where would I find the syntax for creating/manipulating an Outlook object in vbs? (MSKB?) That just may be the way MS intended it to be done.

    regards, Andy

  9. #9
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Roanoke area, Virginia, USA
    Posts
    3,729
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command Line Close

    for scripting information, either at <A target="_blank" HREF=http://www.slipstick.com>http://www.slipstick.com</A> or in the scripting section at <A target="_blank" HREF=http://www.microsoft.com/msdn/>MSDN</A>

    i wish my notes were in my outlook folders, i'd find them within 10 min. unfortunately, they are in text files which were copied to cd. (i really need a good method of cataloging the files i move to cd)

  10. #10
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Command Line Close

    Some more bits and bobs here at <A target="_blank" HREF=http://www.cdolive.com/start.htm>CDOLive</A>

  11. #11
    Andynoff
    Guest

    Re: Command Line Close

    To catalog text files, I've got two suggestions:

    1. If you're using W9x, get a copy of the old DOS gem Lotus Magellan 2.0, which has a file indexing method that's never been beat, even after all these years.

    2. If you're using W2K, try the Indexing Service. Only problems are that it changes the archive bit of all graphics files on the hard drive (which is only noticeable if running incremental or differential backups), it interferes with power management of SCSI hard drives, and it's not particularly good at finding numeric entries. Other than that, it works well to find text entries in text files, web files, and all MS Office files.

    HTH.

    regards, Andy

  12. #12
    Andynoff
    Guest

    Re: Command Line Close

    Thanks. Had a look, but didn't see much about Windows Script Host. Found a new IE Favorite, though.

    regards, Andy

  13. #13
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Command Line Close

    If you know how to access Office objects in VBScript, then the attached VBA module should guide you to a solution, I think. I couldn't tell you whether there's a stub left in my memory or not. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>
    Attached Files Attached Files

  14. #14
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Command Line Close

    Okay, here's the VBScript version. Everyone disable active scripting now lest this pop up in your email someday.
    Attached Files Attached Files

  15. #15
    Andynoff
    Guest

    Re: Command Line Close

    Thanks! Great suggestion!

    BTW, could you point me to a reference, on-line or off, for more info about accessing MSO objects in VBScript?

    regards, Andy

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •