Home All Groups Group Topic Archive Search About

How do I assign a digital signature to an MDB on our network?

Author
30 Oct 2006 8:10 PM
GOI via AccessMonster.com
Good day!

We have several Access 2000 applications (accessed by Windows 2000
workstations) on our network. We now have a batch of workstations running
Access 2003 on Windows XP Pro SP2. Whenever they launch an MDB they get two
pop-ups:
1) Microsoft Office Access
    Security Warning: Unsafe Expresssions are not blocked
    Do you want to block unsafe expressions?   YES-NO-HELP
2) Security Warning
    Opening "FILENAME HERE"
    This file may not be safe it it contains code that was intended to harm
your computer.
    Do you want to open this file or cancel the operation?  CANCEL-OPEN-HELP

Is it possible for the Access 2003-Windows XP Pro users to not have this
message pop-up each time?

If possible, I would like to not lower the Macro-Security level to LOW
(current setting is MEDIUM).

I have created a certificate on my Win2k machine and exported said
certificate to one of the Windows XP SP2 machines (through IE per some of the
threads from this group).

I am surely missing a step somewhere.

Is there a way for me to sign the Access 2000 apps on our network with the
certificate i created on my machine (using selfcert.exe)?

If not, is there code that I could include on the apps such that the Macro
Security level is lowered each time the application is launched and restored
to it's previous level upon exiting?

Thank you very much in advance. I have learned a lot from this discussion
group and would like to thank you all for your assistance.


regards,


Ronnie

--
Message posted via http://www.accessmonster.com

Author
30 Oct 2006 8:24 PM
Granny Spitz via AccessMonster.com
GOI wrote:
> Is there a way for me to sign the Access 2000 apps on our network with the
> certificate i created on my machine (using selfcert.exe)?

Only Access 2003 format databases can be digitally signed.  Earlier versions
can't be signed.

> If not, is there code that I could include on the apps such that the Macro
> Security level is lowered each time the application is launched and restored
> to it's previous level upon exiting?

You can use a VB Script that sets the automation security mode *for that
session* but doesn't change the macro security level in the registry.

Dim obj
Set obj = createobject ("Access.Application")
obj.automationsecurity = 1  ' set macro security LOW.
obj.opencurrentdatabase "full path to your database"
obj.usercontrol = true
Set obj = Nothing

Author
30 Oct 2006 9:47 PM
Frode
Hi I added some comments, hope that is of some helt too.

Show quoteHide quote
"Granny Spitz via AccessMonster.com" wrote:

> GOI wrote:
> > Is there a way for me to sign the Access 2000 apps on our network with the
> > certificate i created on my machine (using selfcert.exe)?
>
> Only Access 2003 format databases can be digitally signed.  Earlier versions
> can't be signed.
>
> > If not, is there code that I could include on the apps such that the Macro
> > Security level is lowered each time the application is launched and restored
> > to it's previous level upon exiting?
>
> You can use a VB Script that sets the automation security mode *for that
> session* but doesn't change the macro security level in the registry.
>
> Dim obj
> Set obj = createobject ("Access.Application")
> obj.automationsecurity = 1  ' set macro security LOW.
> obj.opencurrentdatabase "full path to your database"
> obj.usercontrol = true
> Set obj = Nothing
>

Since you are using a multi version access environment add this to your
script:

If obj.version >= 10 then obj.automationsecurity=1

(before opening currentdb)


I have problem getting this method do work as intended when end user are not
admin of the pc/win session.

Show quoteHide quote
> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200610/1
>
>
Author
31 Oct 2006 4:16 PM
GOI via AccessMonster.com
Thanks Granny Spitz and Frode!

I've tried below but having problems though.

Error message states: "Microsoft Office Access can't open the database
because it is missing, or opened exclusively by another user"

I have entered the correct path and file name. I tried it on the mdb file on
the network as well as on a file on my hard drive. I'm sure the file's exist
as well as am sure that I am the only one accessing it; especially when i
tried to launch the mdb on my hard drive.

I'm on the msdn vbscript webpage trying to learn more about vbscript now.

thanks for your assistance!


Ronnie


Granny Spitz wrote:
> Is there a way for me to sign the Access 2000 apps on our network with the
> certificate i created on my machine (using selfcert.exe)?

Only Access 2003 format databases can be digitally signed.  Earlier versions
can't be signed.


> If not, is there code that I could include on the apps such that the Macro
> Security level is lowered each time the application is launched and restored
> to it's previous level upon exiting?

You can use a VB Script that sets the automation security mode *for that
session* but doesn't change the macro security level in the registry.

Dim obj
Set obj = createobject ("Access.Application")
obj.automationsecurity = 1  ' set macro security LOW.
obj.opencurrentdatabase "full path to your database"
obj.usercontrol = true
Set obj = Nothing



Frode wrote:
Show quoteHide quote
>Hi I added some comments, hope that is of some helt too.
>
>> > Is there a way for me to sign the Access 2000 apps on our network with the
>> > certificate i created on my machine (using selfcert.exe)?
>[quoted text clipped - 15 lines]
>> obj.usercontrol = true
>> Set obj = Nothing
>
>Since you are using a multi version access environment add this to your
>script:
>
>If obj.version >= 10 then obj.automationsecurity=1
>
>(before opening currentdb)
>
>I have problem getting this method do work as intended when end user are not
>admin of the pc/win session.

Author
31 Oct 2006 8:26 PM
Granny Spitz via AccessMonster.com
GOI wrote:
> I have entered the correct path and file name. I tried it on the mdb file on
> the network as well as on a file on my hard drive. I'm sure the file's exist
> as well as am sure that I am the only one accessing it; especially when i
> tried to launch the mdb on my hard drive.

First make sure it really isn't exclusively locked by another user when you
have it on your own hard drive.  Use the LDB viewer to look at the LDB file.
If no one is in the database, it won't let you view it, which eliminates the
idea that it *might* be opened exclusively.  Next, open the database with a
shortcut that uses the same path that you copy and paste from your script
into the shortcut.  If the database opens successfully with this shortcut,
you have a scripting problem.

The scripting problem can be your script's code, its file permissions, or the
registry settings which govern scripts.  Eliminate the chances of problems
with file permissions by placing the script in a folder where your effective
permissions are full control and try to run the script again.  If it still
gives you the same error, log in as a windows administrator and run the
script in a folder where you have full control.  If it still gives you the
same error, you can post your code here and we'll see if we can find any
mistakes in your path syntax.  Other than that, check with your windows admin
to find out what restrictions have been put your computer regarding scripts.

Author
17 Nov 2006 5:13 PM
Brick
Did you ever get a response?
Can you share it with me if you did because I can't find a good solution.

Thanks

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
Author
17 Nov 2006 7:15 PM
Joan Wild
Umm, you didn't post this as a response to whatever thread you were reading,
(or quote any of it), so no one is likely to know what you are referring to.

How about describing what it is you need?


--
Joan Wild
Microsoft Access MVP

Brick wrote:
Show quoteHide quote
> Did you ever get a response?
> Can you share it with me if you did because I can't find a good
> solution.
>
> Thanks
>
> EggHeadCafe.com - .NET Developer Portal of Choice
> http://www.eggheadcafe.com