Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Systems > Windows

Reply
 
LinkBack Thread Tools Display Modes
Old 07-06-2006, 10:53 AM   #1 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
Need help with a simple batch script

I haven't done batch scripting in a long time. All I need to do is load two programs, one after the other, without the script pausing and waiting for the first program to close. The script should load both programs and the CMD window should close. I have no idea what commands/tags to use
__________________
Current Project
Redline is offline   Reply With Quote
Old 07-06-2006, 11:09 AM   #2 (permalink)
Anakashar
C++ Intermediate
 
Anakashar's Avatar
 
Join Date: Feb 2006
Posts: 15
Anakashar is on a distinguished road
It's been a really long while for me, too, but this is what I remember..

locate the absolute path of the two programs. If they're both command prompt-like windows, then that's perfect. For example, i'll say both of the files are in C:\Runme. Your batch file will resemble:

C:\Runme\Runfirst.exe
C:\Runme\Runlast.exe
exit

Now that above should run the programs and then immediately close the initial command prompt window, as well. If this isn't exactly what you were looking for, a little more info and I could dredge up a better solution.
Anakashar is offline   Reply With Quote
Old 07-06-2006, 03:41 PM   #3 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
The programs I needed to run are windows apps. I figured out the solution:

Code:
# Load First Program
cd "C:\Program Path\"
START filename.exe

# Load Second Program
cd "C:\Program Path\"
START filename2.exe
__________________
Current Project
Redline is offline   Reply With Quote
Old 07-06-2006, 04:40 PM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,475
sde is on a distinguished road
maybe make a batch script for each of them, .. and then just call those batch scripts?
__________________
Mike
sde is offline   Reply With Quote
Old 07-06-2006, 05:34 PM   #5 (permalink)
Redline
PHP Student
 
Join Date: Oct 2004
Location: Forest Grove, OR
Posts: 150
Redline is on a distinguished road
Send a message via AIM to Redline Send a message via MSN to Redline
That'd work too, but the one I posted a bit ago works pretty well. I used a localhost ping between the executions to create a two second delay.

The problem was both programs open in full-screen, but one needed to always load over the other on startup. I had to introduce the delay for the one window to consistantly load ontop of the other
__________________
Current Project
Redline is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird Image Scrolling Script...Please Help mark4man HTML, XML, Javascript, AJAX 3 06-14-2005 07:51 AM
Executing a server script from PHP sde PHP 4 02-05-2005 11:12 AM
Simple(?) Batch file ConcreteClam All Other Coding Languages 1 08-24-2004 04:59 AM


All times are GMT -8. The time now is 11:28 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting