Home / Microsoft / Microsoft DOS / CMD box not closing from bat file
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: CMD box not closing from bat file  (Read 1139 times)
DaLiMan
Guest
« on: February 11, 2008, 03:47:06 AM »

Hi,

I have a very simple bat file which opens a MS access file like this

Name of the file
C\:DB.bat

Inside:
"S:\Database\Klanten-produkten-database.mdb"

Now the DB opens nicely, but the cmd box stays open until I close the application or when I close it manually on the big "X"

Anyway of preventing this?
IP logged
DaLiMan
Guest
« Reply #1 on: February 11, 2008, 08:49:48 AM »

hmmm. no replies yet??? :'(

Nobody got any idea, or am I not explaining correctly....

Daniel
IP logged
WillyW
Mentor



Thanked: 27
Posts: 1,823

Experience: Experienced
OS: Windows XP



« Reply #2 on: February 11, 2008, 09:04:31 AM »

Hi,

I have a very simple bat file which opens a MS access file like this

Name of the file
C\:DB.bat

Inside:
"S:\Database\Klanten-produkten-database.mdb"

Now the DB opens nicely, but the cmd box stays open until I close the application or when I close it manually on the big "X"

Anyway of preventing this?

Quote
Inside:
"S:\Database\Klanten-produkten-database.mdb"

This is the complete text of the batch file -  right?


One idea -   what happens if you add     exit   ?
as in:

"S:\Database\Klanten-produkten-database.mdb"
exit




Other idea -    (are you running WinXP  ... or what? )      assuming Windows,
what happens if you right click on your batch file,  go to Properties,  and look for a check box like  "Close on Exit"?    tic it to be ON.     
Experiment with that, and let us know how it behaves then.   
(I don't have XP, so I can't be more specific by experimenting with it myself)

IP logged

.


WillyW
Mentor



Thanked: 27
Posts: 1,823

Experience: Experienced
OS: Windows XP



« Reply #3 on: February 11, 2008, 09:07:41 AM »

Upon re-reading your post,   I may have been going down the wrong road.

Check out:
http://www.computerhope.com/starthlp.htm

I hope this helps.
IP logged

.


SOAP
Beginner



Posts: 60


« Reply #4 on: February 11, 2008, 05:39:37 PM »

I had a similar problem a bit ago. Type your text in your bat file like this ( mspaint is the sample command and ignore the ---------- 's):
------------------------------------------------------------------------------------------------------------------------------------------
start mspaint.exe
end
------------------------------------------------------------------------------------------------------------------------------------------
 Now the window pops up and closes!  :) :) :)

If this doesn't work i might have another idea.


IP logged
DaLiMan
Guest
« Reply #5 on: February 12, 2008, 06:37:47 AM »

Thanks for the replies!!

@SOAP
This seems to work over here at another PC. Gonna check it on my own PC tomorrow.

Thanx y'all    ;)
IP logged
DaLiMan
Guest
« Reply #6 on: February 14, 2008, 01:52:17 AM »

OK, all works fine now but ran into another challenge....  ???

Normally multiple users can use / open the Access file.
But when using the bat file only the first user is able to open the file.

Most of the time about 2 - 3 users a simultaniously in the access database.

Is there a way around?

Please help me.....I am getting desperate   :-[
IP logged
billjenkins
Rookie



Posts: 16


« Reply #7 on: February 14, 2008, 03:34:36 AM »

The solution to your problem can be found at this website - http://www.tipsinfinity.com/technology/article.php?tipID=226

Hope this is useful to you.

Bill
IP logged
llmeyer1000
Intermediate



Thanked: 1
Posts: 205


« Reply #8 on: February 14, 2008, 10:28:50 PM »

Type START /? > START HELP.TXT

The > will redirect the Start helpThis will create a text file in the current directory with all the switches for Start.

I think the line you want is this:

START /B "S:\Database\Klanten-produkten-database.mdb"

Then add the EXIT command at the end, like some others told you.
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / CMD box not closing from bat file « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.123 seconds with 20 queries.