Prevent AutoExec macro while using command line /decompile

  • Thread starter Thread starter Ilya
  • Start date Start date
I

Ilya

Hi all!

Is there a way of preventing the AutoExec macro to start when using /
decompile in command line. I'd like to schedule /decompile action on
an MDB file but every time I execute the "<Access Path> <File path> /
decompile /nostartup" after the decompilation process it starts the
application. Is there a way to bypass it?
I need to make a compact & repair afterwards but the script is stuck
in the application that is opened and does not continue.

I use Access 2002 on Windows XP and some shell script to perform the
desired actions.

Appreciate any help on the issue!

Thanks a lot in advance,
Ilya
 
Why not rename the Autoexec to X_Autoexec?

Hi, KARL!

Actually I do need the AutoExec macro for use in the application
itself. I wanted to know if there is a way to prevent the AutoExec
from starting while using /decompile. When I use the same script for /
compact /nostart AutoExec does not start but the decompilation fires
the AutoExec after completing. There is a way of holding Shift key all
the way down while decompiling to prevent AutoExec from firing but
what's the point of the automatic script then?

Thanks for any help.
Ilya
 
Hi all!

Is there a way of preventing the AutoExec macro to start when using /
decompile in command line. I'd like to schedule /decompile action on
an MDB file but every time I execute the "<Access Path> <File path> /
decompile /nostartup" after the decompilation process it starts the
application. Is there a way to bypass it?
I need to make a compact & repair afterwards but the script is stuck
in the application that is opened and does not continue.

I use Access 2002 on Windows XP and some shell script to perform the
desired actions.

Appreciate any help on the issue!

Thanks a lot in advance,
Ilya

Does anyone have an idea how to solve the issue?

Thanks in advance,
Ilya
 
Try holding down the shift key while you're executing the decompile.

Douglas hi,

The process should be run on schedule and automatically.
It's a bit problem to jump to the office at night just top hold down a
shift key so the decompilation won't start the Autoexec macro...

Does anyone has some idea?

Thanks,
Ilya
 
One off-the-wall thought -

Have your nightly routine create a text file with a specific filename on
your computer/server before it calls the decompilation process, then have it
delete the file after the decopilation process. Change the AutoExec
procedure to use the Dir function to see if the text file exists, and if
yes, stop the macro.
 
The process should be run on schedule and automatically.
It's a bit problem to jump to the office at night just top hold
down a shift key so the decompilation won't start the Autoexec
macro...

Does anyone has some idea?

Don't use an Autoexec macro. Instead, put whatever is in your
Autoexec macro into code, and call that code in a hidden startup
form.

In the startup form, check the COMMAND statement. If it returns
anything, that means something was passed on the commandline with
the /cmd switch. That allows you to run the database with a
commandline switch that will cause it to bypass the end-user startup
routines.
 
One off-the-wall thought -

Have your nightly routine create a text file with a specific filename on
your computer/server before it calls the decompilation process, then have it
delete the file after the decopilation process. Change the AutoExec
procedure to use the Dir function to see if the text file exists, and if
yes, stop the macro.

Ken, hi!

Your idea was brilliant and worked perfect.
I used Scripting.FileSystemObject to check for file existense and
added an Application.Quit for the case the file exists. Works as a
watch!

Good luck and thanks,
Ilya
 
Ilya said:
Ken, hi!

Your idea was brilliant and worked perfect.
I used Scripting.FileSystemObject to check for file existense and
added an Application.Quit for the case the file exists. Works as a
watch!

Good luck and thanks,
Ilya

You're welcome.
 
Back
Top