My application stores its data in an Access 2010 database (accdb) file. It's password protected, which means it's encrypted w/ AES-128.
I'd like to add some meta data to the file that's publically available. This way older verisons of my application can investigate the file to see if it's even worth trying to open. Otherwise, they'll just get the dreaded "Unrecognized Database Format" error, which is usually associated with file corruptions.
In Windows, you can right-click on a file, click "Properties" and see attributes under the Details tab. I'd love it if I add attributes like the version of my application that last touched the file, and maybe other details. I'd like to avoid having a different file extension for each version of my app!
Is it possible to add some public meta data to an encrypted Access 2010 database?
You can add custom database properties : http://support.microsoft.com/default.aspx?scid=kb;en-us;q178745
You can change the file extension of an encrypted Access database and change the properties for that extension. The extension .enc is fairly descriptive and does not seem to be widely used.
The file will open normally when clicked and ask for the password. The icon will be recognizably Access and the description, "Encrypted MS Access" in this case, will appear under Type in a directory listing.
With NTFS, you can add an alternate data stream (ADS):
notepad.exe z:\docs\testde.enc:Extra.txt
Reading the stream:
more < testde.enc:extra.txt
More information: http://www.think-techie.com/2010/04/alternate-data-streams.html
http://www.irongeek.com/i.php?page=security/altds
This is a tough nut to crack! An application must read information about the ACCDB, but that information can't be stored in the ACCDB because you want the read without opening the ACCDB. And you can't use the suggested file system methods because this must work under Wine on Mac (I assume from another of your questions).
The only solution I can see is to create a companion file (with same base name but different extension) to hold the metadata. So if your application wants to know about SomeDb.accdb, it would look for a file named SomeDb.metadata and read that instead.
I suggested a kludge for your earlier question ... unfortunately this is another. :-) However, it's a simple kludge and it should work ... even on Mac.
I'm trying to open a form from an url. This ms access database will be hosted on a shared folder in an network, and the costumer has asked me if it's possible to open an database form (i'll have to pass an ID).
If this were in web environment i would do this without any problem, but honestly in ms access i have no idea how to do this.
Can someone help me?
Have a look at Register protocol and Registering an Application to a URL Protocol. They have a example registry file on how to register a protocol:
REGEDIT4
[HKEY_CLASSES_ROOT\foo]
#="URL:foo Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\foo\shell]
[HKEY_CLASSES_ROOT\foo\shell\open]
[HKEY_CLASSES_ROOT\foo\shell\open\command]
#="\"C:\\Program Files\\Application\\program.exe\" \"%1\""
You can change the last line to something like:
#="\"C:\\Program Files\\Office\\access.exe\" \"C:\\path\\to\\your\\db.mdb\" /cmd \"%1\""
If you URL is foo:241245, the following command is called:
"C:\Program Files\Office\access.exe" "C:\path\to\your\db.mdb" /cmd "241245"
In Access, the commandline arguments are returned by the Command function:
In the direct window:
?Command
241245
The database can be opened from a URL like any other file:
file://server/share/path/database.mdb
This won't work if the database has user-level security on it though. I've only ever done that by using a windows shortcut.
If you're not using user-level security and the URL works, you can set the desired form to open automatically on load by going to the Access Options screen and the Current Database tab, then selecting the desired form from the Display Form drop-down list.
Oops - I just noticed that you said you'd need to pass an ID. I don't know if that's possible using a URL.
Open your Access database from the network location (i.e., with a UNC path, not from a drive letter, or locally).
Navigate so you can see the form listed in your database.
Drag the form to your desktop. A shortcut directly to the form will be created there.
I don't think this is a good idea, though. It's a substitute for a user interface in your Access application. Additionally, your description of the problem sounds like you're intending to have multiple people opening the same database file. This is a really bad practice -- best practice is for the database to be split (back end with data tables only on the server, and individual copy of the front end with forms/reports/etc. on each user's workstation), and more than one user should never be opening the same front end at the same time.
I exported a binary (REG_BINARY) registry value from my computer (IE setting). I need to re-import this into another computer (both Windows 7). When I try to import the registry file (same one that I exported), I get this error: "Cannot import file.reg. Not all data was successfully written to the registry. Some keys are open by the system or other processes." I've tried importing in safe mode with to no avail. After some general research, it seems I need to import binary data a special way, but I can't seem to make it work. This is the registry key:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\User Preferences]
"88D7D0879DAB32E14DE5B3A805A34F98AFF34F5977"=hex:01,00,00,00,d0,8c,9d,df,01,15,\
d1,11,8c,7a,00,c0,4f,c2,97,eb,01,00,00,00,35,9a,4f,4f,a4,58,47,4b,b0,5d,78,\
59,a6,1d,01,df,00,00,00,00,02,00,00,00,00,00,03,66,00,00,c0,00,00,00,10,00,\
00,00,60,cf,a0,df,fc,ef,bc,e4,f4,71,a7,e8,ad,4c,3b,5f,00,00,00,00,04,80,00,\
00,a0,00,00,00,10,00,00,00,80,30,65,dd,2e,3e,2e,45,c0,5b,09,8f,3e,f2,88,79,\
50,00,00,00,24,c2,46,26,e7,85,28,9a,fd,e0,5f,78,ba,7d,04,c8,34,47,5c,ef,64,\
bb,7a,be,f8,c4,dd,88,b5,b1,39,c1,19,9b,81,a3,92,ab,7a,70,8f,dd,19,0c,7f,af,\
66,7d,66,e5,e9,16,6c,20,2b,fa,4a,dd,2b,24,de,df,0a,b2,83,84,29,a7,37,8e,33,\
b7,56,53,f5,a0,34,0b,8c,42
Any ideas how I can import this into another computer? Thanks!
Spent some time to sort out this key. It is only accessed when manipulating the search providers in IE. These changes appear to be done under a very protected code path that controls access to this key. This seems reasonable as the search provider is an attack vector that has been exploited by malware/spyware/adware. I am pretty sure you will not be able to manipulate this key directly without running into issues.
Jason