Home All Groups Group Topic Archive Search About

using the opencurrentdatabase in script

Author
29 Oct 2006 1:47 PM
Frode
Hi
I'm using a vbs to open an access file. Problem is that if the user do not
have admin rights in windows, this method do not work. Any one know why, or
even how to solve this without giving the user admin rights?

(Reason for runing the script is to set the automationsecurity to low before
opening the file. I do not want the automationsecurity to be low on a
permanent setting, and all users should not be granted admin rights)

Thank you!

Author
29 Oct 2006 2:45 PM
Granny Spitz via AccessMonster.com
Frode wrote:
> I'm using a vbs to open an access file. Problem is that if the user do not
> have admin rights in windows, this method do not work. Any one know why,

For security reasons your windows admin has locked down the users' accounts
so that scripts won't run.  This cuts down on malicious viruses.

> (Reason for runing the script is to set the automationsecurity to low before
> opening the file. I do not want the automationsecurity to be low on a
> permanent setting, and all users should not be granted admin rights)

Then none of the non-admin users with Access 2003 will be opening your
database unless you sign it with a digital certificate and they *trust* that
certificate.

Author
29 Oct 2006 2:51 PM
Granny Spitz via AccessMonster.com
Granny Spitz wrote:
> Then none of the non-admin users with Access 2003 will be opening your
> database unless you sign it with a digital certificate and they *trust* that
> certificate.

At least not without the security warnings if their computers are set at
medium, and not at all if they're set at high.

Author
29 Oct 2006 11:14 PM
Frode
"Granny Spitz via AccessMonster.com" wrote:

> Frode wrote:
> > I'm using a vbs to open an access file. Problem is that if the user do not
> > have admin rights in windows, this method do not work. Any one know why,
>
> For security reasons your windows admin has locked down the users' accounts
> so that scripts won't run.  This cuts down on malicious viruses.
>

No, that is not the case. The script is running just fine. Using error
handling the error description is about: "File not found or open exclusive by
another user", neither is true. The script is creating the access application
object, but errors when using the opencurrentdb.... I gave the account admin
rights to its own windows session, and volla everthing works just nice and
dandy.

Show quoteHide quote
> > (Reason for runing the script is to set the automationsecurity to low before
> > opening the file. I do not want the automationsecurity to be low on a
> > permanent setting, and all users should not be granted admin rights)
>
> Then none of the non-admin users with Access 2003 will be opening your
> database unless you sign it with a digital certificate and they *trust* that
> certificate.
>



> --
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-security/200610/1
>
>
Author
29 Oct 2006 11:55 PM
Granny Spitz via AccessMonster.com
Frode wrote:
>> > I'm using a vbs to open an access file. Problem is that if the user do not
>> > have admin rights in windows, this method do not work. Any one know why,
>>
>> For security reasons your windows admin has locked down the users' accounts
>> so that scripts won't run.  This cuts down on malicious viruses.
>>
>
> No, that is not the case. The script is running just fine. Using error
> handling the error description is about: "File not found or open exclusive by
> another user", neither is true. The script is creating the access application
> object, but errors when using the opencurrentdb.... I gave the account admin
> rights to its own windows session, and volla everthing works just nice and
> dandy.

Like I said hon, the windows admin locked down users' accounts.  If you'd
given me the exact error message instead of "this method doesn't work" for
non-admin users, I'd have been able to tell you with more precision what's
wrong when running the script.  I had to assume the script was blocked
because you didn't mention error messages.

So now the users have admin rights?  Wasn't one of your criteria in your
first post that users *shouldn't* be granted admin rights?

Author
30 Oct 2006 12:42 PM
Frode
Hi
Yes, the test account with admin rights worked. IT will not give all (20)
users admin rights so case not solved (he, he). But strange thing is after
revoking the admin rights on the test account, it still worked! So must be a
reg key setting og file setting that is generated to enable the
opencurrentdatabase... I'm lost. But thank you for the involvment. I was
hoping someone else have had same problem, and solved it.

Thank you.
Author
30 Oct 2006 1:45 PM
Granny Spitz via AccessMonster.com
Frode wrote:
> But thank you for the involvment. I was
> hoping someone else have had same problem, and solved it.

You're welcome, Frode.  Many people solve it by digitally signing the
database (Microsoft's recommendation), or setting macro security to low
(Access developers' recommendation).  The rest use the automation security
script, as long as they aren't using User level security and scripts aren't
blocked/restricted on the computer.