![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | scripts Good day I am running windows vista on a domain and I realised that my scripts are not executing because of a error My vbs script it adds directories and settings to the machine this script sometimes uses shell dos command but it gets the error on access denied How can I give access to the vbs to run under administrator rights because it works if I run it under administrator? This script was working under windows xp perfectly in the past -- Juan Bredenkamp |
My System Specs![]() |
| | #2 (permalink) |
| | Re: scripts Hi Juan, If it's making changes to protected system files then it cannot run without elevated privileges. This is a design change to prevent malicious software from making system changes without the user's knowledge. -- Best of Luck, Rick Rogers, aka "Nutcase" - Microsoft MVP http://mvp.support.microsoft.com/ Windows help - www.rickrogers.org My thoughts http://rick-mvp.blogspot.com "Juan" <juanb@xxxxxx> wrote in message news B775B80-C522-43BB-B2CE-4C9DBC82FE4C@xxxxxxQuote: > Good day > I am running windows vista on a domain and I realised that my scripts are > not executing because of a error > My vbs script it adds directories and settings to the machine this script > sometimes uses shell dos command but it gets the error on access denied > > How can I give access to the vbs to run under administrator rights because > it works if I run it under administrator? > This script was working under windows xp perfectly in the past > > > -- > Juan Bredenkamp > > |
My System Specs![]() |
| | #3 (permalink) |
| | Re: scripts "Juan" <juanb@xxxxxx> wrote... Quote: > My vbs script it adds directories and settings to the machine this script > sometimes uses shell dos command but it gets the error on access denied > How can I give access to the vbs to run under administrator rights because > it works if I run it under administrator? If your script is performing actions which require Administrative consent, there is no way to avoid this in Vista (short of disabling UAC, which is *not* recommended). But, you can make your scripts *request* consent, rather than just fail with "access denied". In VBScript, the way to do this is to use the ShellExecute method of Shell.Application, to run a "RUNAS" command. This provides a wrapper for your original vbs script, so that it will run as the administrator and request elevation to a full administrative token. Basically, it's adding about 10 extra lines of code to your script. For more background information, check out these pages: http://www.winhelponline.com/articles/185/1/ http://www.microsoft.com/technet/tec...t/default.aspx There are probably several other good links out there as well, which you can find with Google etc. Hope this helps, good luck with it! -- Andrew McLaren amclar (at) optusnet dot com dot au |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| run .cmd scripts on remote machine (automating the MOSS install via scripts) | PowerShell | |||
| Sql scripts | PowerShell | |||
| Scripts | Vista mail | |||
| run different scripts | PowerShell | |||
| UAC and scripts (.wsf) | Vista security | |||