Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

help with vbs script

  • 03-01-2004 12:29am
    #1
    Closed Accounts Posts: 277 ✭✭


    Hi,

    I have been looking how to script a bat to launch a few aps at the same time but finally end up using this readymade vbs script:

    Dim WshShell, oExec
    Set WshShell = CreateObject("WScript.Shell")
    Set oExec = WshShell.Exec("c:\program files\hotmail popper\hotpop.exe")
    Set oExec = WshShell.Exec("c:\program files\thunderbird\thunderbird.exe")
    Set oExec = WshShell.Exec("C:\PMAIL\winpm-32.exe")

    now I am trying to figure out how to close them in one click

    I was told to use this one

    Dim WshShell, oExec1,oExec2,oExec3
    Set WshShell = CreateObject("WScript.Shell")
    Set oExec1 = WshShell.Exec("c:\program files\hotmail popper\hotpop.exe")
    Set oExec2 = WshShell.Exec("c:\program files\thunderbird\thunderbird.exe")
    Set oExec3 = WshShell.Exec("C:\PMAIL\winpm-32.exe")
    msgbox "close all"
    oExec1.Terminate()
    oExec2.Terminate()
    oExec3.Terminate()

    But it doesn't work

    anyone khow how to do this with a bat or a vbs?


Comments

  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    What exactly isn't working? Is it not executing the applications for you or not shutting them down? Or is the msgbox supposed to give them the option of shutting them down? i.e. Yes and No buttons


  • Closed Accounts Posts: 277 ✭✭Fabre


    The shutting down part didn't work.

    But is ok now I have found an alternative, the latest beta version of AutoIt allows to close processes.

    So with a bit of help from the AutoIt forum, I made a macro with AutoIt that launch Thunderbird, hotmail popper, yahoo pops, k9 and close the last 3 when Thunderbird exit.

    very handy

    And when your satisfied with your macro it can be compiled in a .exe


Advertisement