Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I execute two programs in t

Status
Not open for further replies.

MHendler

Mechanical
Mar 28, 2002
35
How can I execute two programs in the same shortcut in Windows?
 
Replies continue below

Recommended for you

MHendler,
This is the way I start a program called CopyFiles.exe then sldworks.exe starts. I put the program under the SolidWorks Icon. I am not sure this is what your after, but I thought I would give it a shot.


Option Explicit
Private Sub Form_Load()
Dim CopySolidWorksMacros As String
CopySolidWorksMacros = Shell("J:\@Engineering Central\Common\Applications\SolidWorks\Executables\CopyFile.exe", 1) ' Run Copy Files program & SolidWorks.
Dim StartSolidWorks As String
On Error Resume Next ' if user leaves text box to soon, then they will be continued to next
StartSolidWorks = Shell("C:\Program Files\SolidWorks\sldworks.exe", 1) ' Run Copy Files program & SolidWorks.
Call cmdExit_Click
End Sub
Private Sub cmdExit_Click()
Unload Me
End
End Sub

' good luck Bradley
 
Ok...

But what I want is how to create a BAT file to execute two programs just clicking in the same shortcut in the Windows desktop.
 
A batch file is really simple.

First create a new text file on your desktop (or anywhere you want for that matter) and rename it to my2Programs.bat. The first part of the filename is really unimportant and you can name it to what ever you need, but the extention must remain .bat.

Now open the .bat file with notepad and enter the lines

c:\windows\system32\calc.exe
c:\windows\system32\charmap.exe

Close the batch file, making sure to save changes.

Then all you need to do is add a shortcut to your desktop and point it to the batch file.


Troy Williams
fenris@hotmail.com
 
OK,

But I have to close the first application to the second be executed.

What I want is both of them executed at the same time.

Regards,

MHendler
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor