[AccessD] \decompile

Paul Wolstenholme Paul.W at industrialcontrol.co.nz
Wed Apr 13 16:21:51 CDT 2022


John,

I don't believe the current directory has to be anything in particular when
you start Access (2010 at least).
If you are passing (as an additional parameter) the name of the database
file you want opened (and decompiled), then you might need to use a fully
qualified filename and enclose that in quotes if there are any spaces
involved.  I've often been caught out (with the error you describe) by not
enclosing the filename parameter in quotes when I should have.

For what it's worth, this is how I use a batch file to determine the Access
version a user has installed (on a site with limited Access versions
present):

Rem Find the MSAccess executable
Rem          Save the full path as %MSAccessExe%
set MSAccessExe=
rem Test for Access 2002
if exist "%ProgramFiles%\Microsoft Office\Office10\MSACCESS.EXE" set
MSAccessExe="%ProgramFiles%\Microsoft Office\Office10\MSACCESS.EXE"
rem Test for Access 2003
if exist "%ProgramFiles%\Microsoft Office\Office11\MSACCESS.EXE" set
MSAccessExe="%ProgramFiles%\Microsoft Office\Office11\MSACCESS.EXE"
rem Tests for other Access versions...
if exist "%ProgramFiles%\Microsoft Office\Office12\MSACCESS.EXE" set
MSAccessExe="%ProgramFiles%\Microsoft Office\Office12\MSACCESS.EXE"
if exist "%ProgramFiles%\Microsoft Office\Office13\MSACCESS.EXE" set
MSAccessExe="%ProgramFiles%\Microsoft Office\Office13\MSACCESS.EXE"
rem Test for Access 2010
if exist "%ProgramFiles%\Microsoft Office\Office14\MSACCESS.EXE" set
MSAccessExe="%ProgramFiles%\Microsoft Office\Office14\MSACCESS.EXE"
if exist "%ProgramFiles(x86)%\Microsoft Office\Office14\MSACCESS.EXE" set
MSAccessExe="%ProgramFiles(x86)%\Microsoft Office\Office14\MSACCESS.EXE"
rem Test for Access 2019 32 bit
if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\MSACCESS.EXE" set
MSAccessExe="%ProgramFiles(x86)%\Microsoft Office\Office16\MSACCESS.EXE"
if exist "%ProgramFiles(x86)%\Microsoft Office\root\Office16\MSACCESS.EXE"
set MSAccessExe="%ProgramFiles(x86)%\Microsoft
Office\root\Office16\MSACCESS.EXE"

Paul Wolstenholme


On Wed, 13 Apr 2022 at 22:42, Jim Dettman via AccessD <
accessd at databaseadvisors.com> wrote:

>
>  It's because of the spaces in the path.  Anytime you have a space in the
> path, it must be enclosed in quotes when it's in a batch file:
>
> "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE"
> /decompile
>
> Jim.
>
>
>
> -----Original Message-----
> From: AccessD On Behalf Of John Colby
> Sent: Tuesday, April 12, 2022 9:04 PM
> To: Access Developers discussion and problem solving
> <accessd at databaseadvisors.com>; John W Colby <jwcolby at gmail.com>
> Subject: [AccessD] \decompile
>
> In the past I always created a batch file to perform a \decompile when I
> opened Access.  I don't have that now so I am creating one.  I found the
> syntax out on FMS as follows:
>
> "C:\Program Files (x86)\Microsoft Office\root\Office16\MSACCESS.EXE
> /decompile"
>
> where the path depends on your instance of Office.  This is in fact my
> correct path.
>
> If I open the command window and paste that in it returns an error message
> "The directory name is invalid".  If I perform a CD C:\Program Files
> (x86)\Microsoft Office\root\Office16 it does in fact change directory into
> that path and from there a  MSACCESS.EXE /decompile opens access.
>
> So what gives?  Majorly confused on this part.
>
> Is it possible to do the same thing with a shortcut to Access?  I created
> the shortcut and placed the /decompile inside of the quotations and Access
> opens, however there is no obvious way to determine whether the /decompile
> is passed in to the access instance.  I vaguely remember that this is the
> method that I used in the past.
>
> I assume that some of you guys do this stuff?
>
> --
> John W. Colby
> Colby Consulting
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list