Access denied??

M

Martin Wulfe

I have written a VB script to install several applications onto a
Windows Vista notebook. It has worked fine up to now, but on one
computer I am getting several different error messages. One is
"Access Denied" when i tried to copy some files to a C:\Program Files
subfolder, in a folder where I just installed a program. Another is
"Unable to save shortcut" when i tried to create and save a new
shortcut to the AllUsersDesktop folder.

I am doing this under an administrator user, and UAC is turned on. And
this has worked without problems on multple similar computers! What
setting do I have to change?
 
M

Mr. Arnold

Martin Wulfe said:
I have written a VB script to install several applications onto a
Windows Vista notebook. It has worked fine up to now, but on one
computer I am getting several different error messages. One is
"Access Denied" when i tried to copy some files to a C:\Program Files
subfolder, in a folder where I just installed a program. Another is
"Unable to save shortcut" when i tried to create and save a new
shortcut to the AllUsersDesktop folder.

I am doing this under an administrator user, and UAC is turned on. And
this has worked without problems on multple similar computers! What
setting do I have to change?

Well, Trustedinstaller is most likely the owner of the folder and not the
Administrators group, or its some other group or individual user account
that doesn't have full rights to the folder in question that is the owner.

http://www.nirmaltv.com/2008/07/11/how-to-take-ownership-of-files-and-folders-in-vista/

It's showing the Advanced button. You should go to the top level C:\Programs
Files or C:\Windows, and you'll see that the Advanced button is not enabled
with your user/admin account. It's like that for many subfolders in the
above mentioned folders.

The Advanced button will be enabled when it is locked-out to your out of the
box user/admin account, by using this account that has full admin rights,
and UAC doesn't have to be disable, because the account has privilege
escalation automatically.

http://www.howtogeek.com/howto/wind...idden-administrator-account-on-windows-vista/
<http://www.computerperformance.co.u...a_Administrator_-_Super_User_(Hidden_Account)>

You'll also notice with either your user/admin or the built-in Administrator
account and working with C:\Programs Files or C":\Windows, you can not add,
update permissions or delete any account when you push the Edit button,
which applies to some sub-folders too, like Windows Media Player.

Also take note here when doing an installation where COM DLL(s) are
involved.

http://chrisbensen.blogspot.com/2007/02/com-registration-under-microsoft.html
 
P

Paul MontGumDropped

R

Rick Rogers

Hi Martin,

Under normal operating conditions, a user will not have sufficient
privileges to write to the C:\Programs Files directory structure as it is
protected as a system folder. Altering files there requires elevation.
Programs run virtualized under a user accounts' appdata folder so as to stay
within the user environment and not the system.

The proper path for the desktop is C:\Users\Public\Desktop (allusers is not
a valid directory, it is a junction point in Vista).

--
Best of Luck,

Rick Rogers, aka "Nutcase" - Microsoft MVP

Windows help - www.rickrogers.org
My thoughts http://rick-mvp.blogspot.com
 
J

Jimmy Brush

Hello,

You will need to launch the script from an elevated command prompt
(right-click, run as administrator).

Although it is strange that it worked on other computers. Were you by chance
logged in as the user 'administrator' on the other computers? By default,
this user account is different than other administrator accounts in that it
is not protected by UAC.

- JB
 

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