Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner

Apparently permissions preventing VB code access to Windows\System32 folder

microsoft.public.windows.vista.administration accounts passwords






Speedup My PC
Reply
  #1 (permalink)  
Old 08-09-2007
Rick
 

Posts: n/a
Apparently permissions preventing VB code access to Windows\System32 folder
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






Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-09-2007
Jon
 

Posts: n/a
Re: Apparently permissions preventing VB code access to Windows\System32 folder


"Rick" <rick@nospam.com> wrote in message
news:ONFQSap2HHA.1100@TK2MSFTNGP06.phx.gbl...
> 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'

--
Jon

Reply With Quote
  #3 (permalink)  
Old 08-09-2007
Kerry Brown
 

Posts: n/a
Re: Apparently permissions preventing VB code access to Windows\System32 folder
"Rick" <rick@nospam.com> wrote in message
news:ONFQSap2HHA.1100@TK2MSFTNGP06.phx.gbl...
> 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


--
Kerry Brown
Microsoft MVP - Shell/User
http://www.vistahelp.ca


Reply With Quote
  #4 (permalink)  
Old 08-12-2007
Rick
 

Posts: n/a
Re: Apparently permissions preventing VB code access to Windows\System32 folder
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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apparently Microsoft Windows XP Is Far From Dead carl feredeck microsoft.public.windows.vista.general 13 07-25-2007 21:26
Cannot access file due to access permissions Help! microsoft.public.windows.vista.administration accounts passwords 2 07-09-2007 08:28
Preventing program access to Documents folder? Nigel Molesworth microsoft.public.windows.vista.general 0 06-11-2007 18:16
File in System32 folder...will not delete POP microsoft.public.windows.vista.general 6 03-28-2007 01:13
>> System32 folder =?Utf-8?B?Sm9uYXRoYW4=?= microsoft.public.windows.vista.general 2 03-01-2007 13:01




All times are GMT +1. The time now is 09:16.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com , Win7Heads.com and Win8Heads.com.


Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.0 RC 2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120