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

R

Rakesh

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
 
R

Rocky

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,
 
B

Beoweolf

have you tried compatibility mode?


Rocky said:
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,
 

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