How to run a .vbs file in administrator mode by default

Posted: 07-03-2008, 12:00 PM
Hi,

I have a vb script file which does some thing like putting some files in
program files folder and tweaking registry entries etc. How can I run this
script as Administrator by default with out right clicking the cmd and then
selecting the "Run As Administrator"
Please help...
Thanks in Advance

How to run a .vbs file in administrator mode by default


Responses to "How to run a .vbs file in administrator mode by default"

Daniel Petri
Guest
Posts: n/a
 
Re: How to run a .vbs file in administrator mode by default
Posted: 07-03-2008, 12:12 PM
Try this tip:

http://www.vistax64.com/tutorials/16...ypass-uac.html

--
Sincerely,

Daniel Petri
MVP, Senior IT consultant, trainer
www.petri.co.il

"Rakesh" <Rocky@discussions.microsoft.com> wrote in message
news:9D03D5C9-EB40-4672-B110-B7421DF02F88@microsoft.com...
> Hi,
>
> I have a vb script file which does some thing like putting some files in
> program files folder and tweaking registry entries etc. How can I run this
> script as Administrator by default with out right clicking the cmd and
> then
> selecting the "Run As Administrator"
> Please help...
> Thanks in Advance
Rocky
Guest
Posts: n/a
 
Re: How to run a .vbs file in administrator mode by default
Posted: 07-03-2008, 02:50 PM
Thanks for the response.

The below tip does not solve my purpose, my case is like this:
When I run my .vbs file directly it is not working and says "Permission
Denied".
But When I run the same .vbs file from command prompt which has been opened
as Administrator (right click and run as administrator) it is working
properly.
But running the script this way is not a feasible solution for users of my
script.
I need some code snippet which runs my .vbs file using administrator
privileges.

Thanks,

"Daniel Petri <MVP>" wrote:
> Try this tip:
>
> http://www.vistax64.com/tutorials/16...ypass-uac.html
>
> --
> Sincerely,
>
> Daniel Petri
> MVP, Senior IT consultant, trainer
> www.petri.co.il
>
> "Rakesh" <Rocky@discussions.microsoft.com> wrote in message
> news:9D03D5C9-EB40-4672-B110-B7421DF02F88@microsoft.com...
> > Hi,
> >
> > I have a vb script file which does some thing like putting some files in
> > program files folder and tweaking registry entries etc. How can I run this
> > script as Administrator by default with out right clicking the cmd and
> > then
> > selecting the "Run As Administrator"
> > Please help...
> > Thanks in Advance
>
Beoweolf
Guest
Posts: n/a
 
Re: How to run a .vbs file in administrator mode by default
Posted: 07-04-2008, 01:27 AM
have you tried compatibility mode?


"Rocky" <Rocky@discussions.microsoft.com> wrote in message
news:29D71CD0-0134-4435-8FF4-82706BE56038@microsoft.com...
> Thanks for the response.
>
> The below tip does not solve my purpose, my case is like this:
> When I run my .vbs file directly it is not working and says "Permission
> Denied".
> But When I run the same .vbs file from command prompt which has been
> opened
> as Administrator (right click and run as administrator) it is working
> properly.
> But running the script this way is not a feasible solution for users of my
> script.
> I need some code snippet which runs my .vbs file using administrator
> privileges.
>
> Thanks,
>
> "Daniel Petri <MVP>" wrote:
>
>> Try this tip:
>>
>> http://www.vistax64.com/tutorials/16...ypass-uac.html
>>
>> --
>> Sincerely,
>>
>> Daniel Petri
>> MVP, Senior IT consultant, trainer
>> www.petri.co.il
>>
>> "Rakesh" <Rocky@discussions.microsoft.com> wrote in message
>> news:9D03D5C9-EB40-4672-B110-B7421DF02F88@microsoft.com...
>> > Hi,
>> >
>> > I have a vb script file which does some thing like putting some files
>> > in
>> > program files folder and tweaking registry entries etc. How can I run
>> > this
>> > script as Administrator by default with out right clicking the cmd and
>> > then
>> > selecting the "Run As Administrator"
>> > Please help...
>> > Thanks in Advance
>>
 
LinkBack Thread Tools Display Modes
 


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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
Default Administrator AJ Windows Vista Administration 7 07-27-2006 12:46 PM
Can't log in as administrator on safe mode. Jay Windows XP Setup 1 01-19-2004 11:40 PM
loading terminal administrator mode on a n XP workstation Tom in Tennessee Windows XP Work Remotely 1 01-02-2004 05:07 PM
How do I change default file saving mode? Judy Windows XP Basics 1 11-21-2003 06:44 AM
Can the Guest account be set to Administrator mode? Lorne Windows XP Security & Administration 0 08-11-2003 08:18 PM