Jump to content

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


Recommended Posts

Guest Rakesh
Posted

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

  • Replies 3
  • Created
  • Last Reply

Popular Days

Guest Daniel Petri
Posted

Try this tip:

 

http://www.vistax64.com/tutorials/162976-bypass-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...<span style="color:blue">

> 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 </span>

Guest Rocky
Posted

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:

<span style="color:blue">

> Try this tip:

>

> http://www.vistax64.com/tutorials/162976-bypass-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...<span style="color:green">

> > 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 </span>

> </span>

Guest Beoweolf
Posted

have you tried compatibility mode?

 

 

"Rocky" <Rocky@discussions.microsoft.com> wrote in message

news:29D71CD0-0134-4435-8FF4-82706BE56038@microsoft.com...<span style="color:blue">

> 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:

><span style="color:green">

>> Try this tip:

>>

>> http://www.vistax64.com/tutorials/162976-bypass-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...<span style="color:darkred">

>> > 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</span>

>> </span></span>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...