From: DianePDavies on
Now I have the problem that my batch-file stays open while the database is
open. When I shut down the database the command prompt shuts down too - or if
I click the "x" in the top right corner - but I would like it to close right
after the command to start the database.

How is that done?
--
Diane


"Stefan Hoffmann" wrote:

> hi Diane,
>
> On 12.04.2010 16:34, DianePDavies wrote:
> > Now it works with:
> > "C:\Program Files\Microsoft Office\OFFICE11 \MSACCESS.EXE" "C:\DEMO\A.mde"
> >
> > However - I would like to place the bat-file in the same folder as A.mde and
> > then not adress A.mde with a full path - similarly I would like to start
> > MSACCESS.EXE without a full path.
> You always need to specifiy the full path to Access except in one case:
>
> If you don't care which possible installed Access version is used then
> you may simply use
>
> Start "C:\DEMO\A.mde"
>
> in your batch.
>
> You may omit the path to the database file, but then your batch does not
> work under some circumstances, e.g.
>
> Store your batch under C:\DEMO\Test.cmd with Start A.mde command line.
> Open a command line window and switch to the root, C:\.
> On C:\ execute your batch:
>
> C:\>\Demo\Test.cmd
>
> This will fail due to the wrong current working directory.
>
>
> mfG
> --> stefan <--
> .
>
From: Stefan Hoffmann on
hi Diane,

On 13.04.2010 11:29, DianePDavies wrote:
> Now I have the problem that my batch-file stays open while the database is
> open. When I shut down the database the command prompt shuts down too - or if
> I click the "x" in the top right corner - but I would like it to close right
> after the command to start the database.
I wonder if you're heading into the right direction with a batch.

What are you trying to achieve? Have you considered using a simple link
instead of a batch?

Maybe you using a front-end update tool like

http://autofeupdater.com/

is what you need.


mfG
--> stefan <--

From: Paul Shapiro on
What exact command(s) did you use in the batch file? I have many clients
using the Start command that Stefan listed below, and the command window
closes as soon as the call to start the db is processed.

If you're copying the current frontend and then starting it up, there should
be two commands in the batch file:
copy /y "\\MyServer\MyPath\A.mde" "C:\Demo\A.mde"
Start "C:\DEMO\A.mde"

"DianePDavies" <DianePDavies(a)discussions.microsoft.com> wrote in message
news:69884A06-0B40-4160-ADC2-42BC4DEF5344(a)microsoft.com...
> Now I have the problem that my batch-file stays open while the database is
> open. When I shut down the database the command prompt shuts down too - or
> if
> I click the "x" in the top right corner - but I would like it to close
> right
> after the command to start the database.
>
> How is that done?
> --
> Diane
>
>
> "Stefan Hoffmann" wrote:
>
>> hi Diane,
>>
>> On 12.04.2010 16:34, DianePDavies wrote:
>> > Now it works with:
>> > "C:\Program Files\Microsoft Office\OFFICE11 \MSACCESS.EXE"
>> > "C:\DEMO\A.mde"
>> >
>> > However - I would like to place the bat-file in the same folder as
>> > A.mde and
>> > then not adress A.mde with a full path - similarly I would like to
>> > start
>> > MSACCESS.EXE without a full path.
>> You always need to specifiy the full path to Access except in one case:
>>
>> If you don't care which possible installed Access version is used then
>> you may simply use
>>
>> Start "C:\DEMO\A.mde"
>>
>> in your batch.
>>
>> You may omit the path to the database file, but then your batch does not
>> work under some circumstances, e.g.
>>
>> Store your batch under C:\DEMO\Test.cmd with Start A.mde command line.
>> Open a command line window and switch to the root, C:\.
>> On C:\ execute your batch:
>>
>> C:\>\Demo\Test.cmd
>>
>> This will fail due to the wrong current working directory.
>>
>>
>> mfG
>> --> stefan <--

From: DianePDavies on
If my command looks exactly like you suggest:

start "C:\DEMO\A.mde"

I just open a command prompt with the title "C:\DEMO\A.mde"

If I have the following:

"C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "C:\DEMO\A.mde"

This starts my database but the command prompt stays open until I close the
databas (or exits the prompt manually by clicking the "x" in the corner).

--
Diane


"Paul Shapiro" wrote:

> What exact command(s) did you use in the batch file? I have many clients
> using the Start command that Stefan listed below, and the command window
> closes as soon as the call to start the db is processed.
>
> If you're copying the current frontend and then starting it up, there should
> be two commands in the batch file:
> copy /y "\\MyServer\MyPath\A.mde" "C:\Demo\A.mde"
> Start "C:\DEMO\A.mde"
>
> "DianePDavies" <DianePDavies(a)discussions.microsoft.com> wrote in message
> news:69884A06-0B40-4160-ADC2-42BC4DEF5344(a)microsoft.com...
> > Now I have the problem that my batch-file stays open while the database is
> > open. When I shut down the database the command prompt shuts down too - or
> > if
> > I click the "x" in the top right corner - but I would like it to close
> > right
> > after the command to start the database.
> >
> > How is that done?
> > --
> > Diane
> >
> >
> > "Stefan Hoffmann" wrote:
> >
> >> hi Diane,
> >>
> >> On 12.04.2010 16:34, DianePDavies wrote:
> >> > Now it works with:
> >> > "C:\Program Files\Microsoft Office\OFFICE11 \MSACCESS.EXE"
> >> > "C:\DEMO\A.mde"
> >> >
> >> > However - I would like to place the bat-file in the same folder as
> >> > A.mde and
> >> > then not adress A.mde with a full path - similarly I would like to
> >> > start
> >> > MSACCESS.EXE without a full path.
> >> You always need to specifiy the full path to Access except in one case:
> >>
> >> If you don't care which possible installed Access version is used then
> >> you may simply use
> >>
> >> Start "C:\DEMO\A.mde"
> >>
> >> in your batch.
> >>
> >> You may omit the path to the database file, but then your batch does not
> >> work under some circumstances, e.g.
> >>
> >> Store your batch under C:\DEMO\Test.cmd with Start A.mde command line.
> >> Open a command line window and switch to the root, C:\.
> >> On C:\ execute your batch:
> >>
> >> C:\>\Demo\Test.cmd
> >>
> >> This will fail due to the wrong current working directory.
> >>
> >>
> >> mfG
> >> --> stefan <--
>
> .
>
From: Paul Shapiro on
Sorry, I think there's a parameter omitted from the Start command.

start "My Window Name" "C:\DEMO\A.mde"

You can get the full documentation for the start command by typing
help start
in a command window.

An excerpt from the help:
Starts a separate window to run a specified program or command.

START ["title"] [/D path] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
[/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
[/AFFINITY <hex affinity>] [/WAIT] [/B] [command/program]
[parameters]

"title" Title to display in window title bar.
path Starting directory.

"DianePDavies" <DianePDavies(a)discussions.microsoft.com> wrote in message
news:384CC582-2E03-4534-8581-B0203673DC60(a)microsoft.com...
> If my command looks exactly like you suggest:
>
> start "C:\DEMO\A.mde"
>
> I just open a command prompt with the title "C:\DEMO\A.mde"
>
> If I have the following:
>
> "C:\Program Files\Microsoft Office\OFFICE11\MSACCESS.EXE" "C:\DEMO\A.mde"
>
> This starts my database but the command prompt stays open until I close
> the
> databas (or exits the prompt manually by clicking the "x" in the corner).
>
> --
> Diane
>
>
> "Paul Shapiro" wrote:
>
>> What exact command(s) did you use in the batch file? I have many clients
>> using the Start command that Stefan listed below, and the command window
>> closes as soon as the call to start the db is processed.
>>
>> If you're copying the current frontend and then starting it up, there
>> should
>> be two commands in the batch file:
>> copy /y "\\MyServer\MyPath\A.mde" "C:\Demo\A.mde"
>> Start "C:\DEMO\A.mde"
>>
>> "DianePDavies" <DianePDavies(a)discussions.microsoft.com> wrote in message
>> news:69884A06-0B40-4160-ADC2-42BC4DEF5344(a)microsoft.com...
>> > Now I have the problem that my batch-file stays open while the database
>> > is
>> > open. When I shut down the database the command prompt shuts down too -
>> > or
>> > if
>> > I click the "x" in the top right corner - but I would like it to close
>> > right
>> > after the command to start the database.
>> >
>> > How is that done?
>> > --
>> > Diane
>> >
>> >
>> > "Stefan Hoffmann" wrote:
>> >
>> >> hi Diane,
>> >>
>> >> On 12.04.2010 16:34, DianePDavies wrote:
>> >> > Now it works with:
>> >> > "C:\Program Files\Microsoft Office\OFFICE11 \MSACCESS.EXE"
>> >> > "C:\DEMO\A.mde"
>> >> >
>> >> > However - I would like to place the bat-file in the same folder as
>> >> > A.mde and
>> >> > then not adress A.mde with a full path - similarly I would like to
>> >> > start
>> >> > MSACCESS.EXE without a full path.
>> >> You always need to specifiy the full path to Access except in one
>> >> case:
>> >>
>> >> If you don't care which possible installed Access version is used then
>> >> you may simply use
>> >>
>> >> Start "C:\DEMO\A.mde"
>> >>
>> >> in your batch.
>> >>
>> >> You may omit the path to the database file, but then your batch does
>> >> not
>> >> work under some circumstances, e.g.
>> >>
>> >> Store your batch under C:\DEMO\Test.cmd with Start A.mde command line.
>> >> Open a command line window and switch to the root, C:\.
>> >> On C:\ execute your batch:
>> >>
>> >> C:\>\Demo\Test.cmd
>> >>
>> >> This will fail due to the wrong current working directory.
>> >>
>> >>
>> >> mfG
>> >> --> stefan <--