• 0

Batch file to launch 2 programs


Question

8 answers to this question

Recommended Posts

  • 0

@echo off

START X:\"Path to your program"\"Program Directory"\app.exe

START X:\"Path to your program"\"Program Directory"\app.exe

Not sure how much of a delay there will be, but it will launch 2 programs from one batch.

  • 0

thats roughly what i was gonna say Jaded1.. but it would start but apps straight after each other;

i don't remember them fully but you could use a command like sleep or pause inbetween them, although i remember pause needs someone to press a button for it to continue with the script.

Trix

  • 0
  Trix said:

thats roughly what i was gonna say Jaded1.. but it would start but apps straight after each other;

i don't remember them fully but you could use a command like sleep or pause inbetween them, although i remember pause needs someone to press a button for it to continue with the script.

Trix

I knew someone would know the pause trick. It's been a while since I messed with batch files.

It should launch them in order and yes you can use switches if I remember correctly.

  • 0

It's also possible with NirCmd without displaying anything on the screen. :)

  Quote
NirCmd is a small command-line utility that allows you to do some useful tasks without displaying any user interface. By running NirCmd with simple command-line option, you can write and delete values and keys in the Registry, write values into INI file, dial to your internet account or connect to a VPN network, restart windows or shut down the computer, create shortcut to a file, change the created/modified date of a file, change your display settings, turn off your monitor, open the door of your CD-ROM drive, and more...

Download NirCmd and copy NirCmd.exe to your System32 directory.

Create a new shortcut: NirCmd.exe execmd start C:\Windows\System32\Calc.exe && NirCmd.exe cmdwait 3000 exec show C:\Windows\System32\MSPaint.exe

This example starts the Calculator, waits 3 seconds and starts Paint.

  • 0
  DWk said:

I wanna launch an application....and say 3 seconds later, launch another one.

Is there a way to do this?

Thanks :D

You can use Shell commands in Visual Basic i.e

You would have to create a new module and insert following: -

Sub Auto_Open

'Opens program

x = Shell("C:\UserGuide.pdf")

'pause

Application.Wait Now + TimeValue("00:00:03")

End Sub

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.