Run-time error 70 - Permission Denied - when running a particular program in Vista

R

Richard Eagle

I installed Vista Home Premium only days ago and tested the program in
question, and it works fine for me just as it has in XP for more than 2
years. It was another person who has Vista Ultimate (upgrade) who tried the
program and gets this error every time:

Run-time error: '70'
Permission denied

....and asked me about it.

The program is one I wrote in VB6 and its purpose is to embed EOTs for use
in OE stationery messages (.eml or .nws). The program works when you drag an
..eml or .nws message and drop it on the program icon. The program reads the
message source and modifies the message by embedding one or more EOTs.
Apparently the Run-time error: '70' occurs for this other person when the
program tries to write to the hard disk.

If I right-click on the program .exe and select 'Properties' and then click
on the 'Compatibility' tab, I have a checkbox which is unchecked for 'Run
this program as an administrator'. I don't need to check it for the program
to run, and if I do check it, the program still works fine although I get
the UAC prompts only with it checked.

The person getting the error has this same checkbox unchecked and grayed
out, so they cannot check it. All of their other programs are the same way
although their other programs work fine for them with no error. Also, they
are the only user on their PC and are logged in as administrator. Trying XP
compatibility did not work for them either to eliminate the error.

I don't have access to the other person's PC and only have email
communication which makes diagnosing this more difficult.

It seems to me that if they are logged in as administrator, the 'Run this
program as an administrator' under the program's 'Properties' >
'Compatibility' should not be grayed out. I'm wondering if anyone has an
idea of how to fix this problem. Any help would be greatly appreciated.

Thanks,
Richard
 
J

Jimmy Brush

Hello,

By default, if they have logged in as "the administrator" account, UAC
is automatically disabled while running inside this account... so,
they should never see any UAC prompts from this account.

That being said, changing the "run as administrator" flag on the
program would not do anything under the administrator account, since
all programs are already running as administrator, without prompting.

Note that extremely sensitive system areas (such as windows\system32)
won't even let admins (by default) modify existing files there, so
that may be the problem.

I guess what we really need to know is:

- If the user has changed default UAC settings (enabled UAC for the
administrator account?)
- What is the file and location that the program is attempting to
modify?
- What is the permissions set on that file/location (using the icacls
command-line utility -- eg, "icacls filename.exe")?

All that notwithstanding, nothing should not be affecting the disabled
state of the "run as administrator" checkbox.

Note that the 'run as administrator' checkbox is disabled on shortcuts
as well as system utilities.

THe user may be trying to set the checkbox on a shortcut to your
program, and not on the actual program.

To do that, they must right-click the shortcut, click the advanced
button at the bottom-right of the shortcut tab, and click run as
administrator there.

But, doing that shouldn't help out in this case.
 
F

Frank

Jimmy said:
Hello,

By default, if they have logged in as "the administrator" account, UAC
is automatically disabled while running inside this account... so,
they should never see any UAC prompts from this account.

That being said, changing the "run as administrator" flag on the
program would not do anything under the administrator account, since
all programs are already running as administrator, without prompting.

Note that extremely sensitive system areas (such as windows\system32)
won't even let admins (by default) modify existing files there, so
that may be the problem.

I guess what we really need to know is:

- If the user has changed default UAC settings (enabled UAC for the
administrator account?)
- What is the file and location that the program is attempting to
modify?
- What is the permissions set on that file/location (using the icacls
command-line utility -- eg, "icacls filename.exe")?

All that notwithstanding, nothing should not be affecting the disabled
state of the "run as administrator" checkbox.

Note that the 'run as administrator' checkbox is disabled on shortcuts
as well as system utilities.

THe user may be trying to set the checkbox on a shortcut to your
program, and not on the actual program.

To do that, they must right-click the shortcut, click the advanced
button at the bottom-right of the shortcut tab, and click run as
administrator there.

But, doing that shouldn't help out in this case.
Yeah you just gotta love the idiot who was actually stupid enough to
make a video of just how dumb he really is.
First, he's talking to the computer, then he's talking either to himself
or to someone else in the room and the computer picks it up and he is
such a moron he doesn't realize it.
So of course, he blames the speech recognition software.
Now we see this on youtube and brainless idiots watch it and they don't
get whats really going on.
Frank
 
R

Richard

Jimmy Brush said:

Hi Jimmy, and thanks much for your reply, and for the link to your website
as well.

By default, if they have logged in as "the administrator" account, UAC
is automatically disabled while running inside this account... so,
they should never see any UAC prompts from this account.

I don't understand this because I am the only user on this PC and am logged
in as "the administrator", and I get some UAC prompts without changing the
UAC setting since installing Vista 6 days ago. UAC was on by default on this
PC.

Okay, I only just now turned UAC off and the 'Run this program as an
administrator' under the program's 'Properties' | 'Compatibility' is still
unchecked and now grayed out for me so I at least now see what the other
person sees. I tried the program again with UAC off and it still works fine
for me with no run-time error.

That being said, changing the "run as administrator" flag on the
program would not do anything under the administrator account, since
all programs are already running as administrator, without prompting.

That makes sense.

Note that extremely sensitive system areas (such as windows\system32)
won't even let admins (by default) modify existing files there, so
that may be the problem.

I understand. This is somewhat off-topic but for a different program, I had
to copy these VB files: richtx32.ocx, comdlg32.ocx & mscomctl.ocx ...from
windows\system32 in XP Pro to windows\system32 in Vista HP and then
registered them using a batch file and they all work fine. Did the same with
dxmeta2.dll and it works fine too. To register them, I used something like:
regsvr32 richtx32.ocx
....in the batch file and then had to right-click the batch file and 'run as
administrator' to make it work even though I'm logged in as administrator.
I got the batch file tip for registering the files on the VB general group.

I guess what we really need to know is:

- If the user has changed default UAC settings (enabled UAC for the
administrator account?)

I will ask them and find out for sure. I'm assuming that they have UAC off
like I just tried. They did show me a screenshot showing them logged on
as administrator and are the only user on their PC.

- What is the file and location that the program is attempting to
modify?

I will ask them and find out for sure. Don't think it's in any restricted
folder like windows\system32

- What is the permissions set on that file/location (using the icacls
command-line utility -- eg, "icacls filename.exe")?

This is something new to me. I created a small batch file and ran it and got
this result for the .exe and .nws files:
=====================================
I:\programs>icacls "I:\programs\r&m_embed.exe"
I:\programs\r&m_embed.exe Everyone:(I)(F)

Successfully processed 1 files; Failed processing 0 files

I:\programs>icacls "I:\programs\test.nws"
I:\programs\test.nws Everyone:(I)(F)

Successfully processed 1 files; Failed processing 0 files
=====================================

I will have the other person test this and will let you know.

All that notwithstanding, nothing should not be affecting the disabled
state of the "run as administrator" checkbox.

Like I stated above, I just turned off UAC (for the 1st time) on this PC and
the 'Run this program as an administrator' under the program's 'Properties'
| 'Compatibility' is still unchecked but now grayed out for me. I will ask
them if they have UAC turned off. I'm assuming that they do.
Note that the 'run as administrator' checkbox is disabled on shortcuts
as well as system utilities.

Not with UAC on. The 'run as administrator' checkbox is not disabled on
shortcuts on this PC.

The user may be trying to set the checkbox on a shortcut to your
program, and not on the actual program.

I am fairly certain that they are not using a shortcut but I will confirm
that.
To do that, they must right-click the shortcut, click the advanced
button at the bottom-right of the shortcut tab, and click run as
administrator there.

Probably not applicable but I will find out for sure.

But, doing that shouldn't help out in this case.

Thanks again Jimmy and I will reply again when I get the info from the
person getting the run-time error and will let you know. Hopefully there
will be a solution. I did have yet another person with Vista test the
program and it worked fine for them so it's only 1 out of 3 (including me)
with Vista so far who get the run-time error.
 
J

Jimmy Brush

On Wed, 16 May 2007 18:21:48 -0400, "Richard"

I don't understand this because I am the only user on this PC and am logged
in as "the administrator", and I get some UAC prompts without changing the
UAC setting since installing Vista 6 days ago. UAC was on by default on this
PC.

Ah OK I forgot that if the only user account on the computer is the
account named Administrator, then UAC *is* turned on under that
account.

This is the case when the user upgraded from Windows XP with only an
account named Administrator.

If there are other accounts besides the one named Administrator, then
the built-in administrator account is disabled by default,and if the
user manually re-enables it, then logging in to it causes UAC to be
off while inside that account.
Okay, I only just now turned UAC off and the 'Run this program as an
administrator' under the program's 'Properties' | 'Compatibility' is still
unchecked and now grayed out for me so I at least now see what the other
person sees. I tried the program again with UAC off and it still works fine
for me with no run-time error.

I disabled UAC on my computer but didn't restart when it asked me too
and I still had the option to check that box... maybe I should have
restarted.

Like I stated above, I just turned off UAC (for the 1st time) on this PC and
the 'Run this program as an administrator' under the program's 'Properties'
| 'Compatibility' is still unchecked but now grayed out for me. I will ask
them if they have UAC turned off. I'm assuming that they do.

Fascinating .. I didn't realize it would do that with UAC off.
Not with UAC on. The 'run as administrator' checkbox is not disabled on
shortcuts on this PC.

Hmm.. It seems that only shortcuts that reference files in certain
locations are greyed out. I had just assumed they all were like that
:).

<snip>

Well, you're right, it sounds like they have disabled UAC, which means
they should not be getting access denied errors.

So I guess the best bet would be to get the icacls results and see
what the permissions are set on the file they are trying to modify, as
that would be the most likely problem.
 
R

Richard

Thanks much Jimmy for your reply. I will let you know the info from the
other person including the icacls results just as soon as I find out, so
please check back occasionally to check for my follow-up reply.

Thanks,
Richard
 
R

Richard Eagle

Jimmy, I'm sorry for the late reply. The person ran into other problems and
is doing a clean install Vista on a new hard drive instead of as an upgrade.
Hopefully that will fix the problem. Thanks again for the info you provided.

Richard


On Wed, 16 May 2007 18:21:48 -0400, "Richard"

I don't understand this because I am the only user on this PC and am logged
in as "the administrator", and I get some UAC prompts without changing the
UAC setting since installing Vista 6 days ago. UAC was on by default on
this
PC.

Ah OK I forgot that if the only user account on the computer is the
account named Administrator, then UAC *is* turned on under that
account.

This is the case when the user upgraded from Windows XP with only an
account named Administrator.

If there are other accounts besides the one named Administrator, then
the built-in administrator account is disabled by default,and if the
user manually re-enables it, then logging in to it causes UAC to be
off while inside that account.
Okay, I only just now turned UAC off and the 'Run this program as an
administrator' under the program's 'Properties' | 'Compatibility' is still
unchecked and now grayed out for me so I at least now see what the other
person sees. I tried the program again with UAC off and it still works fine
for me with no run-time error.

I disabled UAC on my computer but didn't restart when it asked me too
and I still had the option to check that box... maybe I should have
restarted.

Like I stated above, I just turned off UAC (for the 1st time) on this PC
and
the 'Run this program as an administrator' under the program's 'Properties'
| 'Compatibility' is still unchecked but now grayed out for me. I will ask
them if they have UAC turned off. I'm assuming that they do.

Fascinating .. I didn't realize it would do that with UAC off.
Not with UAC on. The 'run as administrator' checkbox is not disabled on
shortcuts on this PC.

Hmm.. It seems that only shortcuts that reference files in certain
locations are greyed out. I had just assumed they all were like that
:).

<snip>

Well, you're right, it sounds like they have disabled UAC, which means
they should not be getting access denied errors.

So I guess the best bet would be to get the icacls results and see
what the permissions are set on the file they are trying to modify, as
that would be the most likely problem.
 

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