|  | Security/Programming Question |  | |
| | | CorporateQAinTX |  |
| Posted: Mon Sep 15, 2008 1:15 pm Post subject: Security/Programming Question |  |
| |  | |
I couldn't determine which section to list this question under, so I'm re-posting it under this category.
I found a thread regarding opening an MDE using some VBS code written by Jeff Conrad, an Access MVP.
Here's the code:
dim o set o=createobject ("Access.Application") o.automationsecurity=1 ' low. o.opencurrentdatabase "\\server\workgroup\filepath" o.visible=true o.usercontrol=true set o=nothing
The MDE file is in a folder that everyone has authority to access. I don't want anyone but me or any future DB admins from having access to the tables and queries, so I found an article in the MSDN library regarding use of Access Runtime and MDE's to add security. It works on my computer, but I authored all of the VBA and Macros involved. When I try to open it on other computers, they get messages similar to what you get in Excel when you try to open a file with Macros and your macro security is set to high. So, I incorporated Jeff’s code above to open the db and lower the software securities at the same time.
The code will open an MDB or MDE directly, but I want to open the MDE file using Runtime. I just can't figure out how to use the "/runtime" code in the VBS.
To sum it up, right now I can have people open a MDE in runtime, but they have to know how to manually change the security settings in their Access software. Or I can open the MDE directly with the security already lowered, but they can access the tables, forms, queries, etc.
Does that make any sense? Any help will be much appreciated. |
| |
| | | Albert D. Kallal |  |
| Posted: Mon Sep 15, 2008 6:18 pm Post subject: Re: Security/Programming Question |  |
| |  | |
"CorporateQAinTX" <CorporateQAinTX@discussions.microsoft.com> wrote in message news:08003006-F03A-4A2F-A233-
| Quote: | set o=createobject ("Access.Application")
The code will open an MDB or MDE directly, but I want to open the MDE file using Runtime.
|
I don't belive you can use the /runtime swtich when you use autoatmon. In fact, the above will NOT work if you are in a runtime envoemnt (becuase the runtime edition requrites you to supply a file name on the startup swtichs....createObject does NOT work.
You could perhaps use "shell" command and then use GetObject..(this does work and is a way around the runtime limitations).
| Quote: | To sum it up, right now I can have people open a MDE in runtime, but they have to know how to manually change the security settings in their Access software.
|
I would simply setup an installer, and change the securty settings to low. Don't confuse the macro securty settings with that of securing the ability of users to get inside the applcation (they are 100% differnt issues here).
| Quote: | Or I can open the MDE directly with the security already lowered, but they can access the tables, forms, queries, etc.
|
I would use an inno script to install the mde, and simply set the marco securty to low...
You'll find the inno installer here: LINK
Note the above link also has a good number of support and very active newsgroups that can help you with your install setups also. I highly recommend this installer, and it is free. and, for questions, check out the newsgroups there also.
[Setup]
SourceDir=c:\Documents and Settings\All Users\Application Data\RidesL
AppName=Rides Reservation System AppVerName= Rides 2.0 DefaultDirName={commonappdata}\RidesL DefaultGroupName=Rides Compression=lzma SolidCompression=yes DirExistsWarning=no DisableDirPage=yes DisableProgramGroupPage=yes Uninstallable=no
[Files] Source: "RidesXP.mde"; DestDir: "{app}"
[Icons]
Name: "{userdesktop}\Rides Reservations (Lodge)"; FileName: "{reg:HKLM\SOFTWARE\Microsoft\Office\11.0\Access\InstallRoot\,Path}MSACCESS.EXE"; Parameters: """{app}\RidesXP.mde"" /runtime"; IconFilename: "{app}\Rides.ico"; comment: "Lodge Booking System"
[Registry] Root: HKLM; Subkey: "SOFTWARE\Microsoft\Jet\4.0\Engines"; ValueType: dword; ValueName: "SandBoxMode"; ValueData: "2"
Root: HKLM;Subkey: "Software\Microsoft\Office\11.0\Access\Security";ValueType: dword; ValueName: "Level"; ValueData: "1"
| Quote: | Does that make any sense? Any help will be much appreciated.
|
If you trying to keep users out of the application?..then here is another post of mine:
=========
You most certainly can, and should hide all of the ms-access interface. The options to complete hide and keep people out of the ms-access interface can easily be done using the tools->start-up options. Using those options allows you to complete hide the ms-access interface (tool bars, database window etc). Also, using these options means you do not have to bother setting up security.
Try downloading and running the 3rd example at my following web site that shows a hidden ms-access interface, and NO CODE is required to do this....but just some settings in the start-up.
Check out:
LINK
After you try the application, you can exit, and then re-load the application, but hold down the shift key to by-pass the start-up options. If want, you can even disable the shift key by pass. I have a sample mdb file that will let you "set" the shift key bypass on any application you want. You can get this at:
LINK
-- Albert D. Kallal (Access MVP) Edmonton, Alberta Canada pleaseNOOSpamKallal@msn.com |
| |
|
|