Apparently permissions preventing VB code access to Windows\System32 folder

R

Rick

Apparently my Access VB Code does not have permission to access the
"C:\Windows\System32" folder. This code ran perfectly under Windows XP SP2
before upgrading to Windows Vista.

When trying to call a function from a dll file using VB for Access 2007 I
receive the following error:
Run time error '53': File not found: emdaz32.dll

Normally the following code accesses the dll file:
Declare Function DAZOptions Lib "emdaz32.dll" (ByVal lngHandle As Long)
As Long

However, even a full path returns "File not found" error message.
Declare Function DAZOptions Lib " C:\Windows\System32\emdaz32.dll"
(ByVal lngHandle As Long) As Long

The 32-bit dll file exists in the "C:\Windows\System32" folder. If I
copy the emdaz32.dll file to the "C\Users\Rick\Documents" folder and
reference
this full path in my VB code the dll file IS accessed when the code runs,
however, this particular dll file must call another function from a second
dll file which is presently located in the "C:\Windows\System32" folder AND
the "C\Users\Rick\Documents" folder. I then receive the same "File not
found" error for the second dll file.

I'm the only user on this Vista 64-bit computer and of course have
administer privileges. I get the same results with User Account Control
turned on or off.

The Current Owner of the "C:\Windows|System32" folder is "TrustedInstaller".
As a member of the "Users" group I have "Read & execute", "List folder
contents" and "Read" permissions. These are the default permissions and I
can't change them. At least not while "TrustedInstaller" is the owner. I
haven't tried to take ownership of the folder.

Does anyone have any ideas what I might do to correct this problem?

Thanks so much to anyone who offers help.

Rick
 
J

Jon

Rick said:
Apparently my Access VB Code does not have permission to access the
"C:\Windows\System32" folder. This code ran perfectly under Windows XP
SP2
before upgrading to Windows Vista.

When trying to call a function from a dll file using VB for Access 2007 I
receive the following error:
Run time error '53': File not found: emdaz32.dll

Normally the following code accesses the dll file:
Declare Function DAZOptions Lib "emdaz32.dll" (ByVal lngHandle As Long)
As Long

However, even a full path returns "File not found" error message.
Declare Function DAZOptions Lib " C:\Windows\System32\emdaz32.dll"
(ByVal lngHandle As Long) As Long

The 32-bit dll file exists in the "C:\Windows\System32" folder. If I
copy the emdaz32.dll file to the "C\Users\Rick\Documents" folder and
reference
this full path in my VB code the dll file IS accessed when the code runs,
however, this particular dll file must call another function from a second
dll file which is presently located in the "C:\Windows\System32" folder
AND
the "C\Users\Rick\Documents" folder. I then receive the same "File not
found" error for the second dll file.

I'm the only user on this Vista 64-bit computer and of course have
administer privileges. I get the same results with User Account Control
turned on or off.

The Current Owner of the "C:\Windows|System32" folder is
"TrustedInstaller".
As a member of the "Users" group I have "Read & execute", "List folder
contents" and "Read" permissions. These are the default permissions and I
can't change them. At least not while "TrustedInstaller" is the owner. I
haven't tried to take ownership of the folder.

Does anyone have any ideas what I might do to correct this problem?

Thanks so much to anyone who offers help.

Rick


Try running it 'elevated'. Right-click 'Run as administrator'
 
K

Kerry Brown

Rick said:
Apparently my Access VB Code does not have permission to access the
"C:\Windows\System32" folder. This code ran perfectly under Windows XP
SP2
before upgrading to Windows Vista.

When trying to call a function from a dll file using VB for Access 2007 I
receive the following error:
Run time error '53': File not found: emdaz32.dll

Normally the following code accesses the dll file:
Declare Function DAZOptions Lib "emdaz32.dll" (ByVal lngHandle As Long)
As Long

However, even a full path returns "File not found" error message.
Declare Function DAZOptions Lib " C:\Windows\System32\emdaz32.dll"
(ByVal lngHandle As Long) As Long

The 32-bit dll file exists in the "C:\Windows\System32" folder. If I
copy the emdaz32.dll file to the "C\Users\Rick\Documents" folder and
reference
this full path in my VB code the dll file IS accessed when the code runs,
however, this particular dll file must call another function from a second
dll file which is presently located in the "C:\Windows\System32" folder
AND
the "C\Users\Rick\Documents" folder. I then receive the same "File not
found" error for the second dll file.

I'm the only user on this Vista 64-bit computer and of course have
administer privileges. I get the same results with User Account Control
turned on or off.

The Current Owner of the "C:\Windows|System32" folder is
"TrustedInstaller".
As a member of the "Users" group I have "Read & execute", "List folder
contents" and "Read" permissions. These are the default permissions and I
can't change them. At least not while "TrustedInstaller" is the owner. I
haven't tried to take ownership of the folder.

Does anyone have any ideas what I might do to correct this problem?

Thanks so much to anyone who offers help.


I don't know the answer but you might find it on the MSDN forums.

http://forums.microsoft.com/msdn/default.aspx?siteid=1
 
R

Rick

As always... those of you that take time out your day to read these news
groups and post your suggestions and solutions desire so much more than a
simple text thank you. Unfortunately, that's all I can offer in this forum.

Thank you for your help and thank you to Dennis with Microsoft who called
with a fix.

Installing Microsoft's Direct Mail Manager Update (v.2.02.0044) copied the
dll files into the "C:\Windows\SysWOW64" folder.
After installing this update my Access VB code runs perfectly without an
absolute path to the dll file names.
Declare Function DAZOptions Lib "emdaz32.dll" (ByVal lngHandle As Long)
As Long
It still runs great even after uninstalling the update because the dll files
remain in the "C:\Windows\SysWOW64" folder. If I remove the files from this
folder I experience the same "File not found" error as before.

Apparently with Windows Vista I must copy dll files to the
"C:\Windows\SysWOW64" folder.
(Actually the update installed them in both folders so I've left them both
in each folder.)

Thanks
Rick
 

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