|
#1
|
||||
|
||||
|
DOS and Batch files
I am working on trying to launch an application not in association with AMS by using a batch file. I have no problem with launching the file, but in Win2k the command window remains open after the launch of the application and if you close the command window, the application launched by the command window also closes.
Does anyone have any suggestions on how to launch a program using a batch file and then be able to close the command window that the batch file used but have the launched application remain open. Thanks
__________________
TJ-Tigger "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools." "Draco dormiens nunquam titillandus." Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine |
|
#2
|
||||
|
||||
|
Sure there's a couple ways. You have to mess around and figure which one is best. One way is to pipe the output to a file by using a > character. Another way might be to terminate it from AMS. Also if you create a shortcut to a batch file you can set the chortcut to run the console window minimized. So if you have an exit command in your batch file, the user would never see it.
Anyhow to make it simple start here and see if this is all you need: http://www.computerhope.com/issues/ch000320.htm Let me know if that doesn't work and we'll try something else.
|
|
#3
|
||||
|
||||
|
Thanks Corey, I will give it a try, but I think it is a problem with 2000 and xp where it will not exit the command window if it is still running the program. The product we are launching is a Java program.
I will try it tomorrow. Tigg
__________________
TJ-Tigger "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools." "Draco dormiens nunquam titillandus." Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine |
|
#4
|
||||
|
||||
|
I'm certain there are ways to have the batch file window close in XP with the launched program still running. I've done it. We'll figure it out, although it may require a combination of steps.
For example what if you created a small .exe in AMS to kill the batch file window, and then launched that from the batch file after the java program? I mean that's obviously way too sketchy to be the best solution but it just illustrates that where there's a will there's a way. For sure you can run any batch file minimized by creating a shortcut to it, then right clicking on the shortcut and going into the properties and selecting "Run : minimized". |
|
#5
|
||||
|
||||
|
You could try adding these two lines to the end of your batch file so it will close automatically once the commands are done:
@echo off cls As for making cmd not wait for the application to terminate, you could try using the START command: START <filepath>
__________________
--[[ Indigo Rose Software Developer ]] Last edited by Lorne; 01-13-2005 at 12:57 PM. |
|
#6
|
||||
|
||||
|
Quote:
|
|
#7
|
||||
|
||||
|
I've edited my post a bit, but I think that works in XP as well. Not sure about NT (it's been a looooooong time since I've used NT).
__________________
--[[ Indigo Rose Software Developer ]] |
|
#8
|
|||
|
|||
|
Quote:
Do you mean 'exit'? |
|
#9
|
||||
|
||||
|
Quote:
![]()
Last edited by Intrigued; 01-13-2005 at 01:31 PM. Reason: edited due to usually hyper-type-syndrom happening |
|
#10
|
||||
|
||||
|
Quote:
|
|
#11
|
||||
|
||||
|
CLS, which clears the command console (a.k.a. DOS prompt).
AFAIK this is still required in XP when you're invoking the command prompt by executing a batch file.
__________________
--[[ Indigo Rose Software Developer ]] |
|
#12
|
||||
|
||||
|
Lorne, last night I created a batch file (test.bat) and just had one line coded in:
START filepathandnameofprogramhere It started up... I just could not find a way to close the command prompt from the batch file. ;-( (The system is running Win XP Home, btw) |
|
#13
|
||||
|
||||
|
Hi guys. Making a batch file run and go away without seeing it is in this example, see attached. When you run "runme" you won't see a thing hopefully but you will see a new text file appear next to your batch file.
Anyhow that's this, if this doesn't help your specific scenario Tigger, let me know and I'll show you a couple more methods. Bottom line, it's definitely do-able. The only question is can we get away with doing it this way or do we need to create code in our main AMS project to kill the DOS window too. Either way I remember doing this a few times for little utilities I've built in AMS and I always was able to get it working, so... |
|
#14
|
||||
|
||||
|
Waitttt.. that's two files!
|
|
#15
|
||||
|
||||
|
For the following to have any impact, you must say it like Edward G. Robinson:
What files? I don't know nothin' 'bout no files, See? Yeah... See? I didn't see nuttin'! See? Nuttin'! Yeah... That's the official corporate response anyhow... |
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| DOS commands | John_Klassek | AutoPlay Media Studio 5.0 | 4 | 09-16-2004 09:48 AM |
| Running Batch files with attributes | jimmy guilfoyle | AutoPlay Media Studio 4.0 | 3 | 12-05-2003 06:07 AM |
| Output DOS Commands (or batch files) to AMS4 Page (textBOx Object) Is it possible? | Martin_SBT | AutoPlay Media Studio 4.0 | 8 | 10-30-2003 09:32 AM |
| Reading from DOS environment | Lorne | Setup Factory 6.0 | 4 | 04-05-2002 12:00 AM |
| Running a batch file | racedog | AutoPlay Menu Studio 3.0 | 2 | 05-11-2001 02:55 AM |
All times are GMT -6. The time now is 02:46 AM.









Linear Mode

