Can I improve my setup?

G

Guest

Following plenty of excellent advice in these forums I have finally developed
and launched my app at work. I split the database, putting the backend on the
server and the frontend on the user workstation as well as making my own mdw
file to stop unwanted visitors! I made a custom desktop shortcut pointing to
the location of MSACCESS.EXE, the mde fe file and the mdw file and this all
works great.

However, I'd really appreciate some advice from those with more experience
to deal with a problem that has occurred. I work in a hospital and my app is
for the doctors to enter unusual case presentations. Initially I'm just
working with one doctor whilst we test the programme. Every user in the
hospital has their own private area on one server and I have installed the FE
file in the doctors area of that server. The BE is installed on a separate
server for general access. My intention was that I could give him a desktop
icon that pointed to all the relevant files and then it wouldn't matter which
PC he was logged onto he would be able to access the programme. We have PC's
all over the hospital that can be used by any user. First question; does it
defeat the benefits of splitting a db if the FE is also on a server albeit a
different one from the BE? Hospital security doesn't allow installation of
files onto C: drives. My second question is that the location of the
MSACCESS.EXE file varies on many of the workstations because of
inconsistencies in the original installation of MS Office when the PC's were
first built, this is beyond my control. I have ended up having to put (so
far!!) 4 shortcuts on the desktop to cater for the 4 different locations on
the Access application. My doctor uses the shortcut that has a "proper" icon
depending upon which PC he has logged onto. Can anyone make any suggestions
for improvements on this?

Thanks for any suggestions you may have,
Ian.
 
K

Keith Wilby

Ian said:
We have PC's
all over the hospital that can be used by any user. First question; does
it
defeat the benefits of splitting a db if the FE is also on a server albeit
a
different one from the BE? Hospital security doesn't allow installation of
files onto C: drives.

Instead of launching you app from the shortcut, you could launch a batch
file which will copy your FE to the user's profile and then open it. This
is a copy of a recent posting of mine in another Access group:

I store a copy of my latest FEs in a public folder. Each user's shortcut,
instead of mapping to the mdb, maps to a batch file which copies the FE to
their HDD and opens it. This way, all users always start with the latest
FE. Typically, that batch file would contain this code:

ECHO OFF
DEL "%userprofile%\LocalDBFolder\*.*" /Q
XCOPY "X:\MyFile.mdb" "%userprofile%\LocalDBFolder" /I
START "MyApp" /MAX "C:\Program Files\Microsoft Office\Office11\MSACCESS.EXE"
"%userprofile%\LocalDBFolder\MyFile.mdb" /wrkgrp "X:\MyPath\MyWIF.mdw"
/user guest

HTH - Keith.
www.keithwilby.com
 
G

Guest

Hi Keith,

Interesting angle, thanks very much. I'm just fiddling with the batch file
to see if it will work for me. At the moment I can't get it to use the mdw
file I specifiy in the START line. Couple of questions though, what does
"MyApp" /MAX do and can you close the batch file windows that open when the
batch file is run?

If you don't mind I'll get back to you if I'm still struggling to make it
work after a bit more fiddling.

Thanks again,
Ian.
 
G

Guest

Hi Keith,

P.S. I forgot to say, the batch file idea still requires the path to the
main MSACCESS.EXE file, which is different on many machines in our hospital.
I could have a number of different batch files but I wouldn't know which one
to use because I don't know which specific workstation PC the user would be
using at any one time, unless there is a DOS command that can go and find a
given file and return it's path?

Cheers,
Ian.
 
K

Keith Wilby

Ian said:
Hi Keith,

Interesting angle, thanks very much. I'm just fiddling with the batch file
to see if it will work for me. At the moment I can't get it to use the mdw
file I specifiy in the START line. Couple of questions though, what does
"MyApp" /MAX do and can you close the batch file windows that open when
the
batch file is run?

"MyApp" /MAX *should* stop the batch file window from appearing. "MyApp"
can read anything AIUI, try changing it to the name of your mdb file.
If you don't mind I'll get back to you if I'm still struggling to make it
work after a bit more fiddling.

No probs.
 
K

Keith Wilby

Ian said:
Hi Keith,

P.S. I forgot to say, the batch file idea still requires the path to the
main MSACCESS.EXE file, which is different on many machines in our
hospital.
I could have a number of different batch files but I wouldn't know which
one
to use because I don't know which specific workstation PC the user would
be
using at any one time, unless there is a DOS command that can go and find
a
given file and return it's path?

Sorry Ian, I don't have an answer for that one. In my environment all PCs
are imaged identically.

Keith.
 
J

jacksonmacd

Hi Keith,

P.S. I forgot to say, the batch file idea still requires the path to the
main MSACCESS.EXE file, which is different on many machines in our hospital.
I could have a number of different batch files but I wouldn't know which one
to use because I don't know which specific workstation PC the user would be
using at any one time, unless there is a DOS command that can go and find a
given file and return it's path?

Cheers,
Ian.

PMFJI - how about writing a VB script that asks the user for the
location of MSACCESS.EXE (using a FileOpen dialogue), then store the
result in the Registry?. Then replace the batch file with a script
that reads the Registry for the correct file location and launches it.

(Just a thought... I haven't written or used such a beast...)
 
G

Guest

Hi Mac,

Thanks for the idea, a bit out of my league at the moment but it's something
for me to look at and play with, cheers.

Ian.
 
G

Guest

Try using regquery to get the Access location: Here's mine, which works fine
on Citrix too. Could be improved a bit.

ECHO OFF
REM General startup batch file 28/10/04
SETLOCAL
SET APP=appfilename_
SET PrgVer=100
SET ICON=myappicon.lnk
SET SRCDIR=path to folder above the data dir
SET MTCFILE="%SRCDIR%\data\Sysmaint.htm"

REM Don't start if in maint mode
IF EXIST %MTCFILE% (
%MTCFILE%
goto end
)

REM Finds the version of access running and modifies APP name accordingly.
SET ACCVER=
for /F "usebackq tokens=3*" %%i in (`reg query
"HKLM\SOFTWARE\Microsoft\OFFICE\10.0\Access\InstallRoot" /v "path"`) do set
ACCDIR=%%i %%j
if defined ACCDIR (
REM SET ACCVER=_02
goto icons
) ELSE (
for /F "usebackq tokens=3*" %%i in (`reg query
"HKLM\SOFTWARE\Microsoft\OFFICE\11.0\Access\InstallRoot" /v "path"`) do set
ACCDIR=%%i %%j
REM SET ACCVER=_03
)

:icons
IF NOT EXIST "%USERPROFILE%\Desktop\%ICON%" COPY "%SRCDIR%\app\%ICON%"
"%USERPROFILE%\Desktop"
IF NOT EXIST "%USERPROFILE%\Start Menu\Programs\%ICON%" COPY
"%SRCDIR%\app\%ICON%" "%USERPROFILE%\Start Menu\Programs"

REM This skips app front end copy if file is correct version
IF EXIST "%APPDATA%\%APP%%prgver%%ACCVER%.mdb" goto StartApp ELSE goto DelOld

:DelOld
DEL "%APPDATA%\%APP%*.mdb" /q
COPY /y /b "%SRCDIR%\APP\%APP%%PrgVer%%ACCVER%.MDB" "%APPDATA%"

:StartApp
"%ACCDIR%MSACCESS.EXE" "%APPDATA%\%APP%%PrgVer%%ACCVER%.MDB" /nostartup
/wrkgrp "%SRCDIR%\data\dataflt.mdw" %1 %2 %3 %4

:end
SET PrgVer=
SET APP=
SET ACCDIR=
SET SRCDIR=
SET ACCVER=
ENDLOCAL
ECHO ON
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top